summaryrefslogtreecommitdiff
path: root/regress/agent-ptrace.sh
diff options
context:
space:
mode:
Diffstat (limited to 'regress/agent-ptrace.sh')
-rw-r--r--regress/agent-ptrace.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
index 9f9c99960..cd9c0023d 100644
--- a/regress/agent-ptrace.sh
+++ b/regress/agent-ptrace.sh
@@ -3,6 +3,22 @@
3 3
4tid="disallow agent ptrace attach" 4tid="disallow agent ptrace attach"
5 5
6if have_prog uname ; then
7 case `uname` in
8 Linux|HP-UX|SunOS|NetBSD|AIX|CYGWIN*)
9 echo "skipped (not supported on this platform)"
10 exit 0
11 ;;
12 esac
13fi
14
15if have_prog gdb ; then
16 : ok
17else
18 echo "skipped (gdb not found)"
19 exit 0
20fi
21
6trace "start agent" 22trace "start agent"
7eval `${SSHAGENT} -s` > /dev/null 23eval `${SSHAGENT} -s` > /dev/null
8r=$? 24r=$?
@@ -16,7 +32,7 @@ EOF
16 if [ $? -ne 0 ]; then 32 if [ $? -ne 0 ]; then
17 fail "gdb failed: exit code $?" 33 fail "gdb failed: exit code $?"
18 fi 34 fi
19 grep -q 'ptrace: Operation not permitted.' ${OBJ}/gdb.out 35 grep 'ptrace: Operation not permitted.' >/dev/null ${OBJ}/gdb.out
20 r=$? 36 r=$?
21 rm -f ${OBJ}/gdb.out 37 rm -f ${OBJ}/gdb.out
22 if [ $r -ne 0 ]; then 38 if [ $r -ne 0 ]; then