diff options
Diffstat (limited to 'test/features')
-rwxr-xr-x | test/features/2.5.exp | 104 | ||||
-rw-r--r-- | test/features/features.txt | 4 | ||||
-rwxr-xr-x | test/features/test.sh | 6 |
3 files changed, 112 insertions, 2 deletions
diff --git a/test/features/2.5.exp b/test/features/2.5.exp new file mode 100755 index 000000000..4ba1f5a28 --- /dev/null +++ b/test/features/2.5.exp | |||
@@ -0,0 +1,104 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # | ||
3 | # interface | ||
4 | # | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # | ||
11 | # N | ||
12 | # | ||
13 | send -- "firejail --noprofile --interface=eth0.5\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 0\n";exit} | ||
16 | "Child process initialized" | ||
17 | } | ||
18 | sleep 1 | ||
19 | |||
20 | send -- "/sbin/ifconfig\r" | ||
21 | expect { | ||
22 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
23 | "eth0.5" | ||
24 | } | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 1.5n";exit} | ||
27 | "Link" | ||
28 | } | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 1.6\n";exit} | ||
31 | "10.10.205.10" | ||
32 | } | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 1.7\n";exit} | ||
35 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
36 | } | ||
37 | after 100 | ||
38 | send -- "exit\r" | ||
39 | sleep 1 | ||
40 | |||
41 | # | ||
42 | # O | ||
43 | # | ||
44 | send -- "firejail --noprofile --overlay --interface=eth0.6\r" | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 2\n";exit} | ||
47 | "Child process initialized" | ||
48 | } | ||
49 | sleep 1 | ||
50 | |||
51 | send -- "/sbin/ifconfig\r" | ||
52 | expect { | ||
53 | timeout {puts "TESTING ERROR 3.4\n";exit} | ||
54 | "eth0.6" | ||
55 | } | ||
56 | expect { | ||
57 | timeout {puts "TESTING ERROR 3.5n";exit} | ||
58 | "Link" | ||
59 | } | ||
60 | expect { | ||
61 | timeout {puts "TESTING ERROR 3.6\n";exit} | ||
62 | "10.10.206.10" | ||
63 | } | ||
64 | expect { | ||
65 | timeout {puts "TESTING ERROR 3.7\n";exit} | ||
66 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
67 | } | ||
68 | after 100 | ||
69 | send -- "exit\r" | ||
70 | sleep 1 | ||
71 | |||
72 | # | ||
73 | # C | ||
74 | # | ||
75 | send -- "firejail --noprofile --chroot=/tmp/chroot --interface=eth0.7\r" | ||
76 | expect { | ||
77 | timeout {puts "TESTING ERROR 4\n";exit} | ||
78 | "Child process initialized" | ||
79 | } | ||
80 | sleep 1 | ||
81 | |||
82 | send -- "/sbin/ifconfig\r" | ||
83 | expect { | ||
84 | timeout {puts "TESTING ERROR 5.4\n";exit} | ||
85 | "eth0.7" | ||
86 | } | ||
87 | expect { | ||
88 | timeout {puts "TESTING ERROR 5.5n";exit} | ||
89 | "Link" | ||
90 | } | ||
91 | expect { | ||
92 | timeout {puts "TESTING ERROR 5.6\n";exit} | ||
93 | "10.10.207.10" | ||
94 | } | ||
95 | expect { | ||
96 | timeout {puts "TESTING ERROR 5.7\n";exit} | ||
97 | "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1" | ||
98 | } | ||
99 | after 100 | ||
100 | send -- "exit\r" | ||
101 | sleep 1 | ||
102 | |||
103 | |||
104 | puts "\nall done\n" | ||
diff --git a/test/features/features.txt b/test/features/features.txt index 62f4d8adc..9ac7b944e 100644 --- a/test/features/features.txt +++ b/test/features/features.txt | |||
@@ -59,7 +59,9 @@ C - chroot filesystem | |||
59 | - ping disabled for C by default seccomp filter - transfer test not implemented for C | 59 | - ping disabled for C by default seccomp filter - transfer test not implemented for C |
60 | - test --ip: N, O, C | 60 | - test --ip: N, O, C |
61 | 61 | ||
62 | 2.5 Default gw (--noprofile --net=eth0 --defaultgw=192.168.1.10, run netstat -rn) | 62 | 2.5 interface |
63 | |||
64 | 2.6 Default gw (--noprofile --net=eth0 --defaultgw=192.168.1.10, run netstat -rn) | ||
63 | - N, O, C | 65 | - N, O, C |
64 | 66 | ||
65 | 67 | ||
diff --git a/test/features/test.sh b/test/features/test.sh index 42b59f383..8047bbd0c 100755 --- a/test/features/test.sh +++ b/test/features/test.sh | |||
@@ -4,6 +4,7 @@ | |||
4 | # Feature testing | 4 | # Feature testing |
5 | # | 5 | # |
6 | 6 | ||
7 | # Default features | ||
7 | echo "TESTING: 1.1 disable /boot" | 8 | echo "TESTING: 1.1 disable /boot" |
8 | ./1.1.exp | 9 | ./1.1.exp |
9 | 10 | ||
@@ -28,7 +29,7 @@ echo "TESTING: 1.8 disable /etc/firejail and ~/.config/firejail" | |||
28 | echo "TESTING: 1.10 disable /selinux" | 29 | echo "TESTING: 1.10 disable /selinux" |
29 | ./1.10.exp | 30 | ./1.10.exp |
30 | 31 | ||
31 | 32 | # networking features | |
32 | echo "TESTING: 2.1 hostname" | 33 | echo "TESTING: 2.1 hostname" |
33 | ./2.1.exp | 34 | ./2.1.exp |
34 | 35 | ||
@@ -40,3 +41,6 @@ echo "TESTING: 2.3 mac-vlan" | |||
40 | 41 | ||
41 | echo "TESTING: 2.4 bridge" | 42 | echo "TESTING: 2.4 bridge" |
42 | ./2.4.exp | 43 | ./2.4.exp |
44 | |||
45 | echo "TESTING: 2.5 interface" | ||
46 | ./2.5.exp | ||