summaryrefslogtreecommitdiff
path: root/regress/exit-status.sh
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-05-01 13:17:33 +1000
committerDamien Miller <djm@mindrot.org>2002-05-01 13:17:33 +1000
commit38cd4358921bd674cace17d6bae71143b716027d (patch)
tree6c5a048f13a0a413821bf75b8ad1346b7408447a /regress/exit-status.sh
parent2f09289e741582871ff068f8697b924a257fb703 (diff)
- (djm) Import OpenBSD regression tests. Requires BSD make to run
Diffstat (limited to 'regress/exit-status.sh')
-rw-r--r--regress/exit-status.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/regress/exit-status.sh b/regress/exit-status.sh
new file mode 100644
index 000000000..56b78a622
--- /dev/null
+++ b/regress/exit-status.sh
@@ -0,0 +1,24 @@
1# $OpenBSD: exit-status.sh,v 1.6 2002/03/15 13:08:56 markus Exp $
2# Placed in the Public Domain.
3
4tid="remote exit status"
5
6for p in 1 2; do
7 for s in 0 1 4 5 44; do
8 trace "proto $p status $s"
9 verbose "test $tid: proto $p status $s"
10 ${SSH} -$p -F $OBJ/ssh_proxy otherhost exit $s
11 r=$?
12 if [ $r -ne $s ]; then
13 fail "exit code mismatch for protocol $p: $r != $s"
14 fi
15
16 # same with early close of stdout/err
17 ${SSH} -$p -F $OBJ/ssh_proxy -n otherhost \
18 exec sh -c \'"sleep 2; exec > /dev/null 2>&1; sleep 3; exit $s"\'
19 r=$?
20 if [ $r -ne $s ]; then
21 fail "exit code (with sleep) mismatch for protocol $p: $r != $s"
22 fi
23 done
24done