summaryrefslogtreecommitdiff
path: root/regress/agent-ptrace.sh
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2014-01-28 10:26:25 -0800
committerTim Rice <tim@multitalents.net>2014-01-28 10:26:25 -0800
commit6f917ad376481995ab7d29fb53b08ec8d507eb9e (patch)
tree28b8e366f294cb729598cdb826f626682be73a9b /regress/agent-ptrace.sh
parentab16ef4152914d44ce6f76e48167d26d22f66a06 (diff)
- (tim) [regress/agent.sh regress/agent-ptrace.sh] Assign $? to a variable
when used as an error message inside an if statement so we display the correct into. agent.sh patch from Petr Lautrbach.
Diffstat (limited to 'regress/agent-ptrace.sh')
-rw-r--r--regress/agent-ptrace.sh5
1 files changed, 3 insertions, 2 deletions
diff --git a/regress/agent-ptrace.sh b/regress/agent-ptrace.sh
index 6824b8141..ae150641f 100644
--- a/regress/agent-ptrace.sh
+++ b/regress/agent-ptrace.sh
@@ -45,8 +45,9 @@ else
45 gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF 45 gdb ${SSHAGENT} ${SSH_AGENT_PID} > ${OBJ}/gdb.out 2>&1 << EOF
46 quit 46 quit
47EOF 47EOF
48 if [ $? -ne 0 ]; then 48 r=$?
49 fail "gdb failed: exit code $?" 49 if [ $r -ne 0 ]; then
50 fail "gdb failed: exit code $r"
50 fi 51 fi
51 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
52 r=$? 53 r=$?