aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rwxr-xr-xtest/hostname.exp (renamed from test/name.exp)0
-rwxr-xr-xtest/net_mtu.exp30
-rwxr-xr-xtest/noroot.exp7
-rwxr-xr-xtest/option-join.exp6
-rwxr-xr-xtest/quiet.exp17
-rwxr-xr-xtest/test.sh12
6 files changed, 57 insertions, 15 deletions
diff --git a/test/name.exp b/test/hostname.exp
index 42f78dd12..42f78dd12 100755
--- a/test/name.exp
+++ b/test/hostname.exp
diff --git a/test/net_mtu.exp b/test/net_mtu.exp
new file mode 100755
index 000000000..2940241c1
--- /dev/null
+++ b/test/net_mtu.exp
@@ -0,0 +1,30 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7# check ip address
8send -- "firejail --net=br0 --mtu=1000\r"
9expect {
10 timeout {puts "TESTING ERROR 1\n";exit}
11 "Child process initialized"
12}
13sleep 1
14
15send -- "ip link show\r"
16expect {
17 timeout {puts "TESTING ERROR 2\n";exit}
18 "eth0"
19}
20expect {
21 timeout {puts "TESTING ERROR 3\n";exit}
22 "mtu 1000"
23}
24expect {
25 timeout {puts "TESTING ERROR 4\n";exit}
26 "state UP"
27}
28
29puts "\nall done\n"
30
diff --git a/test/noroot.exp b/test/noroot.exp
index d16c28dbe..37d55fe78 100755
--- a/test/noroot.exp
+++ b/test/noroot.exp
@@ -51,13 +51,6 @@ expect {
51} 51}
52puts "\n" 52puts "\n"
53 53
54send -- "cat /etc/hostname\r"
55expect {
56 timeout {puts "TESTING ERROR 3\n";exit}
57 "noroot-sandbox"
58}
59puts "\n"
60
61send -- "ping 0\r" 54send -- "ping 0\r"
62expect { 55expect {
63 timeout {puts "TESTING ERROR 4\n";exit} 56 timeout {puts "TESTING ERROR 4\n";exit}
diff --git a/test/option-join.exp b/test/option-join.exp
index ad8ba73e0..6250e87a2 100755
--- a/test/option-join.exp
+++ b/test/option-join.exp
@@ -17,10 +17,6 @@ expect {
17 timeout {puts "TESTING ERROR 1\n";exit} 17 timeout {puts "TESTING ERROR 1\n";exit}
18 "Switching to pid" 18 "Switching to pid"
19} 19}
20expect {
21 timeout {puts "TESTING ERROR 2 (join) \n";exit}
22 "@svntesting"
23}
24sleep 1 20sleep 1
25 21
26 22
@@ -40,4 +36,4 @@ expect {
40} 36}
41sleep 1 37sleep 1
42 38
43puts "\n" 39puts "\nall done\n"
diff --git a/test/quiet.exp b/test/quiet.exp
new file mode 100755
index 000000000..fa46aebf2
--- /dev/null
+++ b/test/quiet.exp
@@ -0,0 +1,17 @@
1#!/usr/bin/expect -f
2
3set timeout 4
4spawn $env(SHELL)
5match_max 100000
6
7# check ip address
8send -- "firejail --net=br0 --quiet\r"
9expect {
10 "Child process initialized" {puts "TESTING ERROR 1\n";exit}
11 "Interface" {puts "TESTING ERROR 1\n";exit}
12}
13sleep 1
14send -- "\r"
15
16puts "\nall done\n"
17
diff --git a/test/test.sh b/test/test.sh
index 80aa7f3e8..7d43a5786 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -125,9 +125,6 @@ ls -al > tmpreadonly
125sleep 5 125sleep 5
126rm -f tmpreadonly 126rm -f tmpreadonly
127 127
128echo "TESTING: name"
129./name.exp
130
131echo "TESTING: zsh" 128echo "TESTING: zsh"
132./shell_zsh.exp 129./shell_zsh.exp
133 130
@@ -354,6 +351,9 @@ echo "TESTING: read/write /var/lock"
354echo "TESTING: read/write /dev/shm" 351echo "TESTING: read/write /dev/shm"
355./fs_dev_shm.exp 352./fs_dev_shm.exp
356 353
354echo "TESTING: quiet"
355./quiet.exp
356
357echo "TESTING: local network" 357echo "TESTING: local network"
358./net_local.exp 358./net_local.exp
359 359
@@ -366,6 +366,12 @@ echo "TESTING: network IP"
366echo "TESTING: network MAC" 366echo "TESTING: network MAC"
367./net_mac.exp 367./net_mac.exp
368 368
369echo "TESTING: network MTU"
370./net_mtu.exp
371
372echo "TESTING: network hostname"
373./hostname.exp
374
369echo "TESTING: network bad IP" 375echo "TESTING: network bad IP"
370./net_badip.exp 376./net_badip.exp
371 377