Skip to content

Commit 8b5324e

Browse files
committed
debian runtime debugging
Signed-off-by: Richard Purdie <[email protected]>
1 parent 7998115 commit 8b5324e

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

meta/lib/oeqa/runtime/cases/ping.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
#
66

77
from subprocess import Popen, PIPE
8+
import time
9+
import os
810
from time import sleep
911

1012
from oeqa.runtime.case import OERuntimeTestCase
@@ -36,6 +38,17 @@ def test_ping(self):
3638
count = 0
3739
sleep(1)
3840
except OEQATimeoutError:
41+
status, output = self.target.runner.run_serial("ifconfig")
42+
print("ifconfig on target: %s %s" % (output, status))
43+
status, output = self.target.runner.run_serial("ping -c 1 %s" % self.target.server_ip)
44+
print("ping on target: %s %s %s" % (self.target.server_ip, output, status))
45+
status, output = self.target.runner.run_serial("ping -c 1 %s" % self.target.ip)
46+
print("ping on target: %s %s %s" % (self.target.ip, output, status))
47+
os.system("/usr/bin/netstat -tunape")
48+
os.system("/usr/bin/netstat -ei")
49+
os.system("ps -awx")
50+
print("PID: %s %s" % (str(os.getpid()), time.time()))
51+
3952
self.fail("Ping timeout error for address %s, count %s, output: %s" % (self.target.ip, count, output))
4053
msg = ('Expected 5 consecutive, got %d.\n'
4154
'ping output is:\n%s' % (count,output))

meta/lib/oeqa/runtime/cases/ssh.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
# SPDX-License-Identifier: MIT
55
#
66

7+
import os
78
import time
89
import signal
910

@@ -32,6 +33,16 @@ def test_ssh(self):
3233
time.sleep(5)
3334
continue
3435
else:
36+
status, output = self.target.runner.run_serial("ifconfig")
37+
print("ifconfig on target: %s %s" % (output, status))
38+
status, output = self.target.runner.run_serial("ping -c 1 %s" % self.target.server_ip)
39+
print("ping on target: %s %s %s" % (self.target.server_ip, output, status))
40+
status, output = self.target.runner.run_serial("ping -c 1 %s" % self.target.ip)
41+
print("ping on target: %s %s %s" % (self.target.ip, output, status))
42+
os.system("/usr/bin/netstat -tunape")
43+
os.system("/usr/bin/netstat -ei")
44+
os.system("ps -awx")
45+
print("PID: %s %s" % (str(os.getpid()), time.time()))
3546
self.fail("uname failed with \"%s\" (exit code %s)" % (output, status))
3647
if status != 0:
3748
self.fail("ssh failed with \"%s\" (exit code %s)" % (output, status))

0 commit comments

Comments
 (0)