aboutsummaryrefslogtreecommitdiffstats
path: root/test/features
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-11-23 08:47:25 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-11-23 08:47:25 -0500
commit5035659fe3533972d79055d8ab828b0ea24d51ba (patch)
treeee9c8e4a808b967394539b4bb1c867cb24d10442 /test/features
parentfeature testing (diff)
downloadfirejail-5035659fe3533972d79055d8ab828b0ea24d51ba.tar.gz
firejail-5035659fe3533972d79055d8ab828b0ea24d51ba.tar.zst
firejail-5035659fe3533972d79055d8ab828b0ea24d51ba.zip
feature testing
Diffstat (limited to 'test/features')
-rwxr-xr-xtest/features/2.5.exp104
-rw-r--r--test/features/features.txt4
-rwxr-xr-xtest/features/test.sh6
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10#
11# N
12#
13send -- "firejail --noprofile --interface=eth0.5\r"
14expect {
15 timeout {puts "TESTING ERROR 0\n";exit}
16 "Child process initialized"
17}
18sleep 1
19
20send -- "/sbin/ifconfig\r"
21expect {
22 timeout {puts "TESTING ERROR 1.4\n";exit}
23 "eth0.5"
24}
25expect {
26 timeout {puts "TESTING ERROR 1.5n";exit}
27 "Link"
28}
29expect {
30 timeout {puts "TESTING ERROR 1.6\n";exit}
31 "10.10.205.10"
32}
33expect {
34 timeout {puts "TESTING ERROR 1.7\n";exit}
35 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
36}
37after 100
38send -- "exit\r"
39sleep 1
40
41#
42# O
43#
44send -- "firejail --noprofile --overlay --interface=eth0.6\r"
45expect {
46 timeout {puts "TESTING ERROR 2\n";exit}
47 "Child process initialized"
48}
49sleep 1
50
51send -- "/sbin/ifconfig\r"
52expect {
53 timeout {puts "TESTING ERROR 3.4\n";exit}
54 "eth0.6"
55}
56expect {
57 timeout {puts "TESTING ERROR 3.5n";exit}
58 "Link"
59}
60expect {
61 timeout {puts "TESTING ERROR 3.6\n";exit}
62 "10.10.206.10"
63}
64expect {
65 timeout {puts "TESTING ERROR 3.7\n";exit}
66 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
67}
68after 100
69send -- "exit\r"
70sleep 1
71
72#
73# C
74#
75send -- "firejail --noprofile --chroot=/tmp/chroot --interface=eth0.7\r"
76expect {
77 timeout {puts "TESTING ERROR 4\n";exit}
78 "Child process initialized"
79}
80sleep 1
81
82send -- "/sbin/ifconfig\r"
83expect {
84 timeout {puts "TESTING ERROR 5.4\n";exit}
85 "eth0.7"
86}
87expect {
88 timeout {puts "TESTING ERROR 5.5n";exit}
89 "Link"
90}
91expect {
92 timeout {puts "TESTING ERROR 5.6\n";exit}
93 "10.10.207.10"
94}
95expect {
96 timeout {puts "TESTING ERROR 5.7\n";exit}
97 "UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1"
98}
99after 100
100send -- "exit\r"
101sleep 1
102
103
104puts "\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
622.5 Default gw (--noprofile --net=eth0 --defaultgw=192.168.1.10, run netstat -rn) 622.5 interface
63
642.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
7echo "TESTING: 1.1 disable /boot" 8echo "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"
28echo "TESTING: 1.10 disable /selinux" 29echo "TESTING: 1.10 disable /selinux"
29./1.10.exp 30./1.10.exp
30 31
31 32# networking features
32echo "TESTING: 2.1 hostname" 33echo "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
41echo "TESTING: 2.4 bridge" 42echo "TESTING: 2.4 bridge"
42./2.4.exp 43./2.4.exp
44
45echo "TESTING: 2.5 interface"
46./2.5.exp