diff options
author | netblue30 <netblue30@yahoo.com> | 2015-10-18 11:07:49 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2015-10-18 11:07:49 -0400 |
commit | 6d39f22968c7cf2a51cb162664589770c84aac69 (patch) | |
tree | 8a717a0324b43a8134182ceeee6455b59535b465 /test | |
parent | --hostname (diff) | |
download | firejail-6d39f22968c7cf2a51cb162664589770c84aac69.tar.gz firejail-6d39f22968c7cf2a51cb162664589770c84aac69.tar.zst firejail-6d39f22968c7cf2a51cb162664589770c84aac69.zip |
testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/hostname.exp (renamed from test/name.exp) | 0 | ||||
-rwxr-xr-x | test/net_mtu.exp | 30 | ||||
-rwxr-xr-x | test/noroot.exp | 7 | ||||
-rwxr-xr-x | test/option-join.exp | 6 | ||||
-rwxr-xr-x | test/quiet.exp | 17 | ||||
-rwxr-xr-x | test/test.sh | 12 |
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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # check ip address | ||
8 | send -- "firejail --net=br0 --mtu=1000\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 1\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "ip link show\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 2\n";exit} | ||
18 | "eth0" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 3\n";exit} | ||
22 | "mtu 1000" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 4\n";exit} | ||
26 | "state UP" | ||
27 | } | ||
28 | |||
29 | puts "\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 | } |
52 | puts "\n" | 52 | puts "\n" |
53 | 53 | ||
54 | send -- "cat /etc/hostname\r" | ||
55 | expect { | ||
56 | timeout {puts "TESTING ERROR 3\n";exit} | ||
57 | "noroot-sandbox" | ||
58 | } | ||
59 | puts "\n" | ||
60 | |||
61 | send -- "ping 0\r" | 54 | send -- "ping 0\r" |
62 | expect { | 55 | expect { |
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 | } |
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 2 (join) \n";exit} | ||
22 | "@svntesting" | ||
23 | } | ||
24 | sleep 1 | 20 | sleep 1 |
25 | 21 | ||
26 | 22 | ||
@@ -40,4 +36,4 @@ expect { | |||
40 | } | 36 | } |
41 | sleep 1 | 37 | sleep 1 |
42 | 38 | ||
43 | puts "\n" | 39 | puts "\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 | |||
3 | set timeout 4 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | # check ip address | ||
8 | send -- "firejail --net=br0 --quiet\r" | ||
9 | expect { | ||
10 | "Child process initialized" {puts "TESTING ERROR 1\n";exit} | ||
11 | "Interface" {puts "TESTING ERROR 1\n";exit} | ||
12 | } | ||
13 | sleep 1 | ||
14 | send -- "\r" | ||
15 | |||
16 | puts "\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 | |||
125 | sleep 5 | 125 | sleep 5 |
126 | rm -f tmpreadonly | 126 | rm -f tmpreadonly |
127 | 127 | ||
128 | echo "TESTING: name" | ||
129 | ./name.exp | ||
130 | |||
131 | echo "TESTING: zsh" | 128 | echo "TESTING: zsh" |
132 | ./shell_zsh.exp | 129 | ./shell_zsh.exp |
133 | 130 | ||
@@ -354,6 +351,9 @@ echo "TESTING: read/write /var/lock" | |||
354 | echo "TESTING: read/write /dev/shm" | 351 | echo "TESTING: read/write /dev/shm" |
355 | ./fs_dev_shm.exp | 352 | ./fs_dev_shm.exp |
356 | 353 | ||
354 | echo "TESTING: quiet" | ||
355 | ./quiet.exp | ||
356 | |||
357 | echo "TESTING: local network" | 357 | echo "TESTING: local network" |
358 | ./net_local.exp | 358 | ./net_local.exp |
359 | 359 | ||
@@ -366,6 +366,12 @@ echo "TESTING: network IP" | |||
366 | echo "TESTING: network MAC" | 366 | echo "TESTING: network MAC" |
367 | ./net_mac.exp | 367 | ./net_mac.exp |
368 | 368 | ||
369 | echo "TESTING: network MTU" | ||
370 | ./net_mtu.exp | ||
371 | |||
372 | echo "TESTING: network hostname" | ||
373 | ./hostname.exp | ||
374 | |||
369 | echo "TESTING: network bad IP" | 375 | echo "TESTING: network bad IP" |
370 | ./net_badip.exp | 376 | ./net_badip.exp |
371 | 377 | ||