]> andersk Git - openssh.git/blobdiff - regress/agent-ptrace.sh
- (dtucker) [regressh/yes-head.sh] Some platforms (eg Solaris) don't have
[openssh.git] / regress / agent-ptrace.sh
index 9f9c99960ca602677f4caacf3371c54238d46b1b..4124f5844518f17e665a9de3dacf821f4e4d1c04 100644 (file)
@@ -3,6 +3,20 @@
 
 tid="disallow agent ptrace attach"
 
+if [ -x "`which uname 2>&1`" ]; then
+       case `uname` in
+       Linux|HP-UX|SunOS|NetBSD|AIX|CYGWIN*)
+               echo "skipped (not supported on this platform)"
+               exit 0
+               ;;
+       esac
+fi
+
+if [ ! -x "`which gdb 2>&1`" ]; then
+       echo "skipped (gdb not found)"
+       exit 0
+fi
+
 trace "start agent"
 eval `${SSHAGENT} -s` > /dev/null
 r=$?
@@ -16,7 +30,7 @@ EOF
        if [ $? -ne 0 ]; then
                fail "gdb failed: exit code $?"
        fi
-       grep -q 'ptrace: Operation not permitted.' ${OBJ}/gdb.out
+       grep 'ptrace: Operation not permitted.' >/dev/null ${OBJ}/gdb.out
        r=$?
        rm -f ${OBJ}/gdb.out
        if [ $r -ne 0 ]; then
This page took 0.044017 seconds and 4 git commands to generate.