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.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
index 9f29464c5..ae150641f 100644
--- a/regress/agent-ptrace.sh
+++ b/regress/agent-ptrace.sh
@@ -19,6 +19,13 @@ else
19 exit 0 19 exit 0
20fi 20fi
21 21
22if $OBJ/setuid-allowed ${SSHAGENT} ; then
23 : ok
24else
25 echo "skipped (${SSHAGENT} is mounted on a no-setuid filesystem)"
26 exit 0
27fi
28
22if test -z "$SUDO" ; then 29if test -z "$SUDO" ; then
23 echo "skipped (SUDO not set)" 30 echo "skipped (SUDO not set)"
24 exit 0 31 exit 0
@@ -38,8 +45,9 @@ else
38 gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF 45 gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF
39 quit 46 quit
40EOF 47EOF
41 if [ $? -ne 0 ]; then 48 r=$?
42 fail "gdb failed: exit code $?" 49 if [ $r -ne 0 ]; then
50 fail "gdb failed: exit code $r"
43 fi 51 fi
44 egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null ${OBJ}/gdb.out 52 egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null ${OBJ}/gdb.out
45 r=$? 53 r=$?