Skip to content

Commit

Permalink
testsuite: fix flaky test in t0019-tbon-config.t
Browse files Browse the repository at this point in the history
Problem: The test `tbon.endpoint cannot be set` in t0019-tbon-config.t
fails in ci occasionally in ci because the `flux start` command reports
it is terminated by SIGPIPE rather than SIGKILL/SIGTERM.

The test is just meant to detect an expected failure of the command, it
does not matter how the command fails. Just use `!` to detect failure.
Add a note to explain why `test_must_fail` or similar is not used here.

Fixes #6336
  • Loading branch information
grondo committed Jan 18, 2025
1 parent 122bd11 commit c0b3656
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion t/t0019-tbon-config.t
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,12 @@ test_expect_success 'tbon.interface-hint from parent can be overridden' '
flux getattr tbon.interface-hint >childhint2.out &&
grep default-router childhint2.out
'
# Note: the following test has been observed to fail (as expected) in more
# ways than just nonzero exit or terminated by SIGKILL/SIGTERM (in CI the
# test sometimes fails with SIGPIPE). Therefore, use the blanket `!` here
# since we just want to test failure, we don't care how it fails.
test_expect_success 'tbon.endpoint cannot be set' '
test_must_fail_or_be_terminated flux start ${ARGS} -s2 \
! flux start ${ARGS} -s2 \
--setattr=tbon.endpoint=ipc:///tmp/customflux true
'
test_expect_success 'tbon.parent-endpoint cannot be read on rank 0' '
Expand Down

0 comments on commit c0b3656

Please sign in to comment.