summaryrefslogtreecommitdiff
path: root/tests/misc/timeout.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/timeout.sh')
-rwxr-xr-xtests/misc/timeout.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/timeout.sh b/tests/misc/timeout.sh
index 57a4e15d0..66d69566e 100755
--- a/tests/misc/timeout.sh
+++ b/tests/misc/timeout.sh
@@ -36,6 +36,11 @@ test $? = 2 || fail=1
timeout 1 sleep 10
test $? = 124 || fail=1
+# exit status propagation even on timeout
+timeout --preserve-status 1 sleep 10
+# exit status should be 128+TERM
+test $? = 124 && fail=1
+
# kill delay. Note once the initial timeout triggers,
# the exit status will be 124 even if the command
# exits on its own accord.