diff options
Diffstat (limited to 'regress/agent-ptrace.sh')
-rw-r--r-- | regress/agent-ptrace.sh | 18 |
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 | ||
4 | tid="disallow agent ptrace attach" | 4 | tid="disallow agent ptrace attach" |
5 | 5 | ||
6 | if 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 | ||
13 | fi | ||
14 | |||
15 | if have_prog gdb ; then | ||
16 | : ok | ||
17 | else | ||
18 | echo "skipped (gdb not found)" | ||
19 | exit 0 | ||
20 | fi | ||
21 | |||
6 | trace "start agent" | 22 | trace "start agent" |
7 | eval `${SSHAGENT} -s` > /dev/null | 23 | eval `${SSHAGENT} -s` > /dev/null |
8 | r=$? | 24 | r=$? |
@@ -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 |