summaryrefslogtreecommitdiffstats
path: root/test/TEST-09-ISSUE-2691
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-06-24 12:11:19 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2016-06-24 16:07:16 +0200
commitb2ecd099dc7371aafb988145ab40a631f7050d41 (patch)
treeb3c65c452b1baa718afbcee5247692304d7de53a /test/TEST-09-ISSUE-2691
parenttests: make TEST-12-ISSUE-3171 nspawn invocation consistent with other tests (diff)
downloadsystemd-b2ecd099dc7371aafb988145ab40a631f7050d41.tar.xz
systemd-b2ecd099dc7371aafb988145ab40a631f7050d41.zip
tests: track and check for timeouts
If run_qemu() exits with non-zero, this either meant that QEMU was not available (which should be a SKIP) or that QEMU timed out if $QEMU_TIMEOUT was set (which then should be a FAIL). Limit the exit code of run_qemu() to QEMU availability only, and track timeouts separately through the new $TIMED_OUT variable, which is then checked in check_result_qemu(). Do the same for $NSPAWN_TIMEOUT and run_nspawn() so that nspawn and QEMU work similarly.
Diffstat (limited to 'test/TEST-09-ISSUE-2691')
-rwxr-xr-xtest/TEST-09-ISSUE-2691/test.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/TEST-09-ISSUE-2691/test.sh b/test/TEST-09-ISSUE-2691/test.sh
index a782cad37d..8ae02e61ac 100755
--- a/test/TEST-09-ISSUE-2691/test.sh
+++ b/test/TEST-09-ISSUE-2691/test.sh
@@ -18,6 +18,7 @@ check_result_qemu() {
[[ -f $TESTDIR/failed ]] && cat $TESTDIR/failed
ls -l $TESTDIR/journal/*/*.journal
test -s $TESTDIR/failed && ret=$(($ret+1))
+ [ -n "$TIMED_OUT" ] && ret=$(($ret+1))
return $ret
}