Skip to content

Commit 26700a4

Browse files
mrc0mmandbluca
authored andcommitted
test: add missing operators
Without them only the last expression's return value is honored, causing unexpected CI fails: [ 26.006721] testsuite-04.sh[1191]: + for _ in {0..9} [ 26.007672] testsuite-04.sh[1191]: + setterm --term linux --dump --file /tmp/console.dump [ 26.008871] testsuite-04.sh[1233]: + SYSTEMD_COLORS=256 [ 26.009606] testsuite-04.sh[1233]: + /usr/lib/systemd/systemd-bsod [ 26.063296] systemd[1]: session-1.scope: Deactivated successfully. [ 26.124789] testsuite-04.sh[1191]: + grep -aq 'Press any key to exit' /tmp/console.dump [ 26.131509] testsuite-04.sh[1191]: + grep -aq 'Root emergency message' /tmp/console.dump [ 26.137882] testsuite-04.sh[1191]: + grep -aq 'The current boot has failed' /tmp/console.dump [ 26.141650] testsuite-04.sh[1191]: + return 0 [ 26.144816] testsuite-04.sh[1191]: + grep -aq 'Scan the QR code' /tmp/console.dump [ 26.153591] testsuite-04.sh[1191]: + at_exit [ 26.154744] testsuite-04.sh[1191]: + local EC=1 [ 26.155697] testsuite-04.sh[1191]: + [[ 1 -ne 0 ]] [ 26.156787] testsuite-04.sh[1191]: + [[ -e /tmp/console.dump ]] [ 26.157799] testsuite-04.sh[1191]: + cat /tmp/console.dump [ 26.158858] testsuite-04.sh[1244]: The current boot has failed! [ 26.159858] testsuite-04.sh[1244]: Root emergency message I'm genuinely impressed that this worked at all. (cherry picked from commit 32c376a)
1 parent 06d5773 commit 26700a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/units/testsuite-04.bsod.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ vcs_dump_and_check() {
3535
# so try it a couple of times
3636
for _ in {0..9}; do
3737
setterm --term linux --dump --file /tmp/console.dump
38-
if grep -aq "Press any key to exit" /tmp/console.dump
39-
grep -aq "$expected_message" /tmp/console.dump
40-
grep -aq "The current boot has failed" /tmp/console.dump; then
38+
if grep -aq "Press any key to exit" /tmp/console.dump &&
39+
grep -aq "$expected_message" /tmp/console.dump &&
40+
grep -aq "The current boot has failed" /tmp/console.dump; then
4141

4242
return 0
4343
fi

0 commit comments

Comments
 (0)