summaryrefslogtreecommitdiffstats
path: root/meta/recipes-connectivity/openssh
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-connectivity/openssh')
-rwxr-xr-xmeta/recipes-connectivity/openssh/openssh/run-ptest37
1 files changed, 37 insertions, 0 deletions
diff --git a/meta/recipes-connectivity/openssh/openssh/run-ptest b/meta/recipes-connectivity/openssh/openssh/run-ptest
index 564c0c8256..769162e0c8 100755
--- a/meta/recipes-connectivity/openssh/openssh/run-ptest
+++ b/meta/recipes-connectivity/openssh/openssh/run-ptest
@@ -3,5 +3,42 @@
3export TEST_SHELL=sh 3export TEST_SHELL=sh
4 4
5cd regress 5cd regress
6sed -i "/\t\tagent-ptrace /d" Makefile
6make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \ 7make -k .OBJDIR=`pwd` .CURDIR=`pwd` SUDO="sudo" tests \
7 | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g' 8 | sed -e 's/^skipped/SKIP: /g' -e 's/^ok /PASS: /g' -e 's/^failed/FAIL: /g'
9
10
11SSHAGENT=`which ssh-agent`
12GDB=`which gdb`
13
14if [ -z "${SSHAGENT}" -o -z "${GDB}" ]; then
15 echo "SKIP: agent-ptrace"
16fi
17
18useradd openssh-test
19
20eval `su -c "${SSHAGENT} -s" openssh-test` > /dev/null
21r=$?
22if [ $r -ne 0 ]; then
23 echo "FAIL: could not start ssh-agent: exit code $r"
24else
25 su -c "gdb -p ${SSH_AGENT_PID}" openssh-test > /tmp/gdb.out 2>&1 << EOF
26 quit
27EOF
28 r=$?
29 if [ $r -ne 0 ]; then
30 echo "gdb failed: exit code $r"
31 fi
32 egrep 'ptrace: Operation not permitted.|procfs:.*Permission denied.|ttrace.*Permission denied.|procfs:.*: Invalid argument.|Unable to access task ' >/dev/null /tmp/gdb.out
33 r=$?
34 rm -f /tmp/gdb.out
35 if [ $r -ne 0 ]; then
36 echo "FAIL: ptrace agant"
37 else
38 echo "PASS: ptrace agant"
39 fi
40
41 ${SSHAGENT} -k > /dev/null
42fi
43userdel openssh-test
44