Skip to content

test(cli): the activation-maintenance fixture and the drained probe end on definite events - #2592

Merged
DeusData merged 1 commit into
mainfrom
fix/cli-activation-fixture-no-deadlines
Oct 11, 2026
Merged

DeusData merged 1 commit into
mainfrom
fix/cli-activation-fixture-no-deadlines

Conversation

@DeusData

@DeusData DeusData commented Oct 11, 2026 •

Copy link
Copy Markdown
Owner

Follow-up to #2590, test code only (tests/test_cli.c). It removes three more waits that a timeout decided.

What

test wait before now
cli_activation_quiesce_does_not_wait_on_bootstrap_startup participant's cohort join 45 s deadline UINT64_MAX: waits for locks, answers a conflicting holder at once
same watch for the installer's maintenance request at most 120 s until the request, an UNSAFE/IO answer, or the parent's new install-done pipe closes after its install returned
cli_install_into_host_namespace_still_drains_host_cohort "the drained host stopped serving" one status request, 2 s budget the mute-retry rule from #2590: unreachable or stopping decides at once, a slow host that still serves is asked again

The 2 s probe could also produce a false green: a host that still served but answered slowly looked drained. cli_scope_host_serving_within and CLI_SCOPE_HOST_DRAINED_PROBE_MS are removed. Both questions now go through cli_scope_host_serving.

Why the install-done pipe

Without a deadline, the participant needs a definite end for the case where the install never requests maintenance. The parent closes the pipe as soon as its install returns, success or failure.

Checked by hand with the install made to fail before the maintenance barrier (an unknown option): the test ends in 3 s through the pipe. Without the pipe and without the deadline it would hang; with the old deadline it took 120 s. With the install failing after it requested maintenance (an unusable --dir), the test ends in 11 s through the request.

Checks

  • Affected suites (daemon_version daemon_application cli, macOS ASan): 444 passed, 0 failed. make lint-ci clean.
  • Local 3-OS ladder on this exact tree:
    • macOS (scripts/test.sh): 9,137 passed, 0 failed, 11 skipped (177 suites); cli 358/0
    • Linux arm64 container (run.sh test): 8,975 passed, 0 failed, 10 skipped (173 suites); cli 359/0
    • Windows: not gated locally. PR CI is the default gate now, and both changed tests fork a child, so they are POSIX-only and not built on Windows. A local pass already running finished after the push, for information: 8,961 passed, 0 failed, 91 skipped (all 177 suites).

…nd on definite events

Follow-up to #2590: three more waits that a timeout decided.

cli_activation_quiesce_does_not_wait_on_bootstrap_startup:
- Its participant child joined the version cohort with a 45 s deadline. It
  now uses UINT64_MAX, which waits for locks and answers a conflicting
  holder at once.
- The child watched for the installer's maintenance request for at most
  120 s. It now watches until a definite event: the request, an UNSAFE/IO
  answer, or the parent closing a new install-done pipe once its install
  has returned. A failed install therefore ends the watch at once instead
  of hanging, and a slow install is waited for instead of failing.

cli_install_into_host_namespace_still_drains_host_cohort:
- The "drained host stopped serving" probe was one status request with a
  2 s budget, so a slow host that still served could pass as drained (a
  false green). It now asks through the same mute-retry rule as the
  positive probe: a drained host is unreachable or reports stopping at
  once, and a slow host that still serves is asked again until it answers.
  cli_scope_host_serving_within and CLI_SCOPE_HOST_DRAINED_PROBE_MS are
  gone.

Checked by hand: with the install made to fail before it requests
maintenance (an unknown option), the test ends in 3 s through the
install-done pipe. Without the pipe and the old deadline it would hang;
with the deadline it took 120 s.

Signed-off-by: Martin Vogel <martin.vogel.tech@gmail.com>
@DeusData
DeusData merged commit 82b1ec9 into main Oct 11, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant