Skip to content

Commit 12f4ba1

Browse files
committed
test: wait for coredump to appear before parsing
A new core was added to the test, but the loop counter was not increased to wait for it, so the test races against systemd-coredump's processing. This failed at least once in debci: 8015s [ 32.227813] TEST-87-AUX-UTILS-VM.sh[1038]: + coredumpctl info COREDUMP_TIMESTAMP=1679509902000000 8015s [ 32.228684] TEST-87-AUX-UTILS-VM.sh[1723]: No coredumps found. Follow-up for 0c49e0049b7665bb7769a13ef346fef92e1ad4d6 Fixes systemd/systemd#37666 (cherry picked from commit 703fbb0bba7f1a1b46342d6efedda30e51d46135) (cherry picked from commit ccbad62c42ab8e00b824aaa22036cc5cc65ab203) (cherry picked from commit 5ef906f002ec50fa62232a83dc974620fd6b046c)
1 parent 5c85486 commit 12f4ba1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/units/testsuite-74.coredump.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ journalctl -b -n 1 --output=export --output-fields=MESSAGE,COREDUMP COREDUMP_EXE
196196
journalctl -b -n 1 --output=export --output-fields=MESSAGE,COREDUMP COREDUMP_EXE="/usr/bin/test-dump" |
197197
/usr/lib/systemd/systemd-coredump --backtrace $$ 0 0 6 1679509902 12345 youmachine 1
198198
# Wait a bit for the coredumps to get processed
199-
timeout 30 bash -c "while [[ \$(coredumpctl list -q --no-legend $$ | wc -l) -lt 2 ]]; do sleep 1; done"
199+
timeout 30 bash -c "while [[ \$(coredumpctl list -q --no-legend $$ | wc -l) -lt 3 ]]; do sleep 1; done"
200200
coredumpctl info $$
201201
coredumpctl info COREDUMP_TIMESTAMP=1679509900000000
202202
coredumpctl info COREDUMP_TIMESTAMP=1679509901000000

0 commit comments

Comments
 (0)