diff --git a/src/lib/testsuite/test_libxce_retry.c b/src/lib/testsuite/test_libxce_retry.c index a711c3e8..93fbd7c3 100644 --- a/src/lib/testsuite/test_libxce_retry.c +++ b/src/lib/testsuite/test_libxce_retry.c @@ -1847,9 +1847,11 @@ static void test_ff_call_is_single_shot_no_budget(void) /* ── Suite entry point ──────────────────────────────────────────────── */ +/* Runs inside test.c's single UNITY_BEGIN()/UNITY_END(). Its own pair + * reset Unity's counters, so every failure of a group run before this one + * was dropped from the final count and xcelib_test still exited 0. */ void test_libxce_retry(void) { - UNITY_BEGIN(); RUN_TEST(test_retry_defaults_are_reachable); RUN_TEST(test_fake_masters_hold_three_candidates); RUN_TEST(test_master_cursor_advances_and_wraps); @@ -1906,5 +1908,4 @@ void test_libxce_retry(void) RUN_TEST(test_ff_call_is_single_shot_no_budget); RUN_TEST(test_decide_not_ready_backs_off_on_same_controller); RUN_TEST(test_retry_next_not_ready_does_not_rotate); - UNITY_END(); } diff --git a/src/lib/xcelimit.c b/src/lib/xcelimit.c index e5bafaac..9ac1f42c 100644 --- a/src/lib/xcelimit.c +++ b/src/lib/xcelimit.c @@ -231,8 +231,11 @@ int fmt_limit_units(char* buf, int len, xce_limit_t* limit, } if (limit->val.percent != 0) { + /* val is a float: widen after scaling. 0.8f widened first is + * 0.800000011920929, which printed as "80.000001%"; the float + * product rounds to the 80 that was configured. */ rc = snprintf(buf + pos, len - pos, "\n%s = %f%%\n", - limit->val.resname, (double)limit->val.val * 100.0); + limit->val.resname, (double)(limit->val.val * 100.0f)); } else { bool is_swp = (limit->val.resname != NULL) && (strcmp(limit->val.resname, "swp") == 0);