summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--regress/envpass.sh19
-rw-r--r--regress/multiplex.sh9
3 files changed, 22 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index 00864980a..f5a1b14c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -38,6 +38,9 @@
38 [sftp.c] 38 [sftp.c]
39 don't show .files by default in ls, add -a option to turn them back on; 39 don't show .files by default in ls, add -a option to turn them back on;
40 ok markus 40 ok markus
41 - markus@cvs.openbsd.org 2004/06/22 03:12:13
42 [regress/envpass.sh regress/multiplex.sh]
43 more portable env passing tests
41 - (dtucker) [monitor.c] Fix Portable-specific -Wshadow warnings on "socket". 44 - (dtucker) [monitor.c] Fix Portable-specific -Wshadow warnings on "socket".
42 - (dtucker) [defines.h] Define __dead if not already defined. 45 - (dtucker) [defines.h] Define __dead if not already defined.
43 46
@@ -1362,4 +1365,4 @@
1362 - (djm) Trim deprecated options from INSTALL. Mention UsePAM 1365 - (djm) Trim deprecated options from INSTALL. Mention UsePAM
1363 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu 1366 - (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
1364 1367
1365$Id: ChangeLog,v 1.3430 2004/06/22 03:37:11 mouring Exp $ 1368$Id: ChangeLog,v 1.3431 2004/06/22 03:38:56 dtucker Exp $
diff --git a/regress/envpass.sh b/regress/envpass.sh
index 67044d421..a5bae06dd 100644
--- a/regress/envpass.sh
+++ b/regress/envpass.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: envpass.sh,v 1.1 2004/04/27 09:47:30 djm Exp $ 1# $OpenBSD: envpass.sh,v 1.2 2004/06/22 03:12:13 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="environment passing" 4tid="environment passing"
@@ -8,7 +8,9 @@ tid="environment passing"
8trace "pass env, don't accept" 8trace "pass env, don't accept"
9verbose "test $tid: pass env, don't accept" 9verbose "test $tid: pass env, don't accept"
10_TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy otherhost \ 10_TEST_ENV=blah ${SSH} -oSendEnv="*" -F $OBJ/ssh_proxy otherhost \
11 '[ -z "$_TEST_ENV" ]' 11 sh << 'EOF'
12 test -z $_TEST_ENV
13EOF
12r=$? 14r=$?
13if [ $r -ne 0 ]; then 15if [ $r -ne 0 ]; then
14 fail "environment found" 16 fail "environment found"
@@ -17,7 +19,9 @@ fi
17trace "don't pass env, accept" 19trace "don't pass env, accept"
18verbose "test $tid: don't pass env, accept" 20verbose "test $tid: don't pass env, accept"
19${SSH} -F $OBJ/ssh_proxy otherhost \ 21${SSH} -F $OBJ/ssh_proxy otherhost \
20 '[ -z "$_XXX_TEST_A" -a -z "$_XXX_TEST_B" ]' 22 sh << 'EOF'
23 test -z $_XXX_TEST_A && test -z $_XXX_TEST_B
24EOF
21r=$? 25r=$?
22if [ $r -ne 0 ]; then 26if [ $r -ne 0 ]; then
23 fail "environment found" 27 fail "environment found"
@@ -26,7 +30,9 @@ fi
26trace "pass single env, accept single env" 30trace "pass single env, accept single env"
27verbose "test $tid: pass single env, accept single env" 31verbose "test $tid: pass single env, accept single env"
28_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy otherhost \ 32_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -F $OBJ/ssh_proxy otherhost \
29 '[ "x$_XXX_TEST" = "xblah" ]' 33 sh << 'EOF'
34 test X"$_XXX_TEST" = X"blah"
35EOF
30r=$? 36r=$?
31if [ $r -ne 0 ]; then 37if [ $r -ne 0 ]; then
32 fail "environment not found" 38 fail "environment not found"
@@ -36,9 +42,10 @@ trace "pass multiple env, accept multiple env"
36verbose "test $tid: pass multiple env, accept multiple env" 42verbose "test $tid: pass multiple env, accept multiple env"
37_XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -oSendEnv="_XXX_TEST_*" \ 43_XXX_TEST_A=1 _XXX_TEST_B=2 ${SSH} -oSendEnv="_XXX_TEST_*" \
38 -F $OBJ/ssh_proxy otherhost \ 44 -F $OBJ/ssh_proxy otherhost \
39 '[ "x$_XXX_TEST_A" = "x1" -a "x$_XXX_TEST_B" = "x2" ]' 45 sh << 'EOF'
46 test X"$_XXX_TEST_A" = X"1" -a X"$_XXX_TEST_B" = X"2"
47EOF
40r=$? 48r=$?
41if [ $r -ne 0 ]; then 49if [ $r -ne 0 ]; then
42 fail "environment not found" 50 fail "environment not found"
43fi 51fi
44
diff --git a/regress/multiplex.sh b/regress/multiplex.sh
index c167b9632..dbf2025be 100644
--- a/regress/multiplex.sh
+++ b/regress/multiplex.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: multiplex.sh,v 1.7 2004/06/18 06:15:51 dtucker Exp $ 1# $OpenBSD: multiplex.sh,v 1.8 2004/06/22 03:12:13 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4CTL=$OBJ/ctl-sock 4CTL=$OBJ/ctl-sock
@@ -11,12 +11,13 @@ COPY=$OBJ/ls.copy
11start_sshd 11start_sshd
12 12
13trace "start master, fork to background" 13trace "start master, fork to background"
14${SSH} -2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -f somehost \ 14${SSH} -2 -MS$CTL -F $OBJ/ssh_config -oSendEnv="_XXX_TEST" -f somehost sleep 120
15 sleep 120
16 15
17verbose "test $tid: envpass" 16verbose "test $tid: envpass"
18trace "env passing over multiplexed connection" 17trace "env passing over multiplexed connection"
19_XXX_TEST=blah ${SSH} -S$CTL otherhost '[ "x$_XXX_TEST" = "xblah" ]' 18_XXX_TEST=blah ${SSH} -oSendEnv="_XXX_TEST" -S$CTL otherhost sh << 'EOF'
19 test X"$_XXX_TEST" = X"blah"
20EOF
20if [ $? -ne 0 ]; then 21if [ $? -ne 0 ]; then
21 fail "environment not found" 22 fail "environment not found"
22fi 23fi