aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar Reiner Herrmann <reiner@reiner-h.de>2018-05-25 18:37:50 +0200
committerLibravatar Reiner Herrmann <reiner@reiner-h.de>2018-05-25 20:17:39 +0200
commitf2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0 (patch)
treece75c47dfb349e08c2e450a29270e283073afb80 /test
parentFix travis (diff)
downloadfirejail-f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0.tar.gz
firejail-f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0.tar.zst
firejail-f2dd4ca7eedaa9a1a905b4d8ef9217ccf304faf0.zip
tests: check if internet connection available before testing ping with firejail
Diffstat (limited to 'test')
-rwxr-xr-xtest/sysutils/ping.exp7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/sysutils/ping.exp b/test/sysutils/ping.exp
index d10cd2b66..a362a516e 100755
--- a/test/sysutils/ping.exp
+++ b/test/sysutils/ping.exp
@@ -7,6 +7,13 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "ping -c 3 yahoo.com\r"
11expect {
12 timeout {puts "TESTING SKIP: no internet connection\n";exit}
13 "3 packets transmitted, 3 received"
14}
15after 100
16
10send -- "firejail ping -c 3 yahoo.com\r" 17send -- "firejail ping -c 3 yahoo.com\r"
11expect { 18expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 19 timeout {puts "TESTING ERROR 1\n";exit}