aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-08-27 12:37:57 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2015-08-27 12:37:57 -0400
commit746b6aa3b8bd5f8482078925901f09ed0f45c0b3 (patch)
tree51af66cf8652bdb895aa9346bd085ce95741e226 /test
parentMerge pull request #46 from iiotx/master (diff)
downloadfirejail-746b6aa3b8bd5f8482078925901f09ed0f45c0b3.tar.gz
firejail-746b6aa3b8bd5f8482078925901f09ed0f45c0b3.tar.zst
firejail-746b6aa3b8bd5f8482078925901f09ed0f45c0b3.zip
testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/firemon-caps.exp61
-rwxr-xr-xtest/firemon-seccomp.exp10
-rwxr-xr-xtest/net_local.exp6
-rwxr-xr-xtest/net_netfilter.exp10
-rwxr-xr-xtest/net_noip.exp6
-rwxr-xr-xtest/net_noip2.exp6
6 files changed, 45 insertions, 54 deletions
diff --git a/test/firemon-caps.exp b/test/firemon-caps.exp
index 547d04c02..3dd6384db 100755
--- a/test/firemon-caps.exp
+++ b/test/firemon-caps.exp
@@ -4,7 +4,7 @@ set timeout 10
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --name=bingo1 --caps\r" 7send -- "firejail --name=bingo1 --noprofile --caps\r"
8expect { 8expect {
9 timeout {puts "TESTING ERROR 0\n";exit} 9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized" 10 "Child process initialized"
@@ -12,33 +12,33 @@ expect {
12sleep 1 12sleep 1
13 13
14spawn $env(SHELL) 14spawn $env(SHELL)
15send -- "firejail --name=bingo2\r" 15send -- "firejail --name=bingo2 --noprofile\r"
16expect { 16expect {
17 timeout {puts "TESTING ERROR 0\n";exit} 17 timeout {puts "TESTING ERROR 1\n";exit}
18 "Child process initialized" 18 "Child process initialized"
19} 19}
20sleep 1 20sleep 1
21 21
22spawn $env(SHELL) 22spawn $env(SHELL)
23send -- "firejail --name=bingo3 --caps.drop=all\r" 23send -- "firejail --name=bingo3 --noprofile --caps.drop=all\r"
24expect { 24expect {
25 timeout {puts "TESTING ERROR 0\n";exit} 25 timeout {puts "TESTING ERROR 2\n";exit}
26 "Child process initialized" 26 "Child process initialized"
27} 27}
28sleep 1 28sleep 1
29 29
30spawn $env(SHELL) 30spawn $env(SHELL)
31send -- "firejail --name=bingo4 --caps.drop=chown,kill\r" 31send -- "firejail --noprofile --name=bingo4 --caps.drop=chown,kill\r"
32expect { 32expect {
33 timeout {puts "TESTING ERROR 0\n";exit} 33 timeout {puts "TESTING ERROR 3\n";exit}
34 "Child process initialized" 34 "Child process initialized"
35} 35}
36sleep 1 36sleep 1
37 37
38spawn $env(SHELL) 38spawn $env(SHELL)
39send -- "firejail --name=bingo5 --caps.keep=chown,kill\r" 39send -- "firejail --noprofile --name=bingo5 --caps.keep=chown,kill\r"
40expect { 40expect {
41 timeout {puts "TESTING ERROR 0\n";exit} 41 timeout {puts "TESTING ERROR 4\n";exit}
42 "Child process initialized" 42 "Child process initialized"
43} 43}
44sleep 1 44sleep 1
@@ -46,7 +46,7 @@ sleep 1
46spawn $env(SHELL) 46spawn $env(SHELL)
47send -- "firejail --name=bingo6 --profile=caps1.profile\r" 47send -- "firejail --name=bingo6 --profile=caps1.profile\r"
48expect { 48expect {
49 timeout {puts "TESTING ERROR 0\n";exit} 49 timeout {puts "TESTING ERROR 5\n";exit}
50 "Child process initialized" 50 "Child process initialized"
51} 51}
52sleep 1 52sleep 1
@@ -59,77 +59,68 @@ expect {
59} 59}
60sleep 1 60sleep 1
61 61
62
63
64
65spawn $env(SHELL) 62spawn $env(SHELL)
66send -- "firemon --caps\r" 63send -- "firemon --caps\r"
67expect { 64expect {
68 timeout {puts "TESTING ERROR 1\n";exit} 65 timeout {puts "TESTING ERROR 8.1\n";exit}
69 "bingo1" 66 "bingo1"
70} 67}
71expect { 68expect {
72 timeout {puts "TESTING ERROR 2\n";exit} 69 timeout {puts "TESTING ERROR 8.2\n";exit}
73 "31cffff" 70 "31cffff"
74} 71}
75expect { 72expect {
76 timeout {puts "TESTING ERROR 3\n";exit} 73 timeout {puts "TESTING ERROR 8.3\n";exit}
77 "bingo2" 74 "bingo2"
78} 75}
79expect { 76expect {
80 timeout {puts "TESTING ERROR 4\n";exit} 77 timeout {puts "TESTING ERROR 8.4\n";exit}
81 "fffffff" 78 "fffffff"
82} 79}
83expect { 80expect {
84 timeout {puts "TESTING ERROR 5\n";exit} 81 timeout {puts "TESTING ERROR 8.5\n";exit}
85 "bingo3" 82 "bingo3"
86} 83}
87expect { 84expect {
88 timeout {puts "TESTING ERROR 6\n";exit} 85 timeout {puts "TESTING ERROR 8.6\n";exit}
89 "000000000000" 86 "000000000000"
90} 87}
91 88
92expect { 89expect {
93 timeout {puts "TESTING ERROR 7\n";exit} 90 timeout {puts "TESTING ERROR 8.7\n";exit}
94 "bingo4" 91 "bingo4"
95} 92}
96expect { 93expect {
97 timeout {puts "TESTING ERROR 8\n";exit} 94 timeout {puts "TESTING ERROR 8.8\n";exit}
98 "ffffffde" 95 "ffffffde"
99} 96}
100expect { 97expect {
101 timeout {puts "TESTING ERROR 7\n";exit} 98 timeout {puts "TESTING ERROR 8.9\n";exit}
102 "bingo5" 99 "bingo5"
103} 100}
104expect { 101expect {
105 timeout {puts "TESTING ERROR 9\n";exit} 102 timeout {puts "TESTING ERROR 8.10\n";exit}
106 "0000000000000021" 103 "0000000000000021"
107} 104}
108 105
109expect { 106expect {
110 timeout {puts "TESTING ERROR 10\n";exit} 107 timeout {puts "TESTING ERROR 8.11\n";exit}
111 "bingo6" 108 "bingo6"
112} 109}
113expect { 110expect {
114 timeout {puts "TESTING ERROR 11\n";exit} 111 timeout {puts "TESTING ERROR 8.12\n";exit}
115 "ffffffde" 112 "ffffffde"
116} 113}
117expect { 114expect {
118 timeout {puts "TESTING ERROR 12\n";exit} 115 timeout {puts "TESTING ERROR 8.13\n";exit}
119 "bingo7" 116 "bingo7"
120} 117}
121expect { 118expect {
122 timeout {puts "TESTING ERROR 13\n";exit} 119 timeout {puts "TESTING ERROR 8.14\n";exit}
123 "0000000000000021" 120 "0000000000000021"
124} 121}
125 122
123after 100
126 124
127 125puts "all done\n"
128
129
130
131
132sleep 1
133
134puts "\n"
135 126
diff --git a/test/firemon-seccomp.exp b/test/firemon-seccomp.exp
index 0cf53b690..55817faf3 100755
--- a/test/firemon-seccomp.exp
+++ b/test/firemon-seccomp.exp
@@ -4,7 +4,7 @@ set timeout 10
4spawn $env(SHELL) 4spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7send -- "firejail --name=bingo1 --seccomp\r" 7send -- "firejail --noprofile --name=bingo1 --seccomp\r"
8expect { 8expect {
9 timeout {puts "TESTING ERROR 0\n";exit} 9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized" 10 "Child process initialized"
@@ -12,9 +12,9 @@ expect {
12sleep 1 12sleep 1
13 13
14spawn $env(SHELL) 14spawn $env(SHELL)
15send -- "firejail --name=bingo2\r" 15send -- "firejail --noprofile --name=bingo2\r"
16expect { 16expect {
17 timeout {puts "TESTING ERROR 0\n";exit} 17 timeout {puts "TESTING ERROR 0.1\n";exit}
18 "Child process initialized" 18 "Child process initialized"
19} 19}
20sleep 1 20sleep 1
@@ -40,6 +40,6 @@ expect {
40 timeout {puts "TESTING ERROR 3\n";exit} 40 timeout {puts "TESTING ERROR 3\n";exit}
41 "Seccomp: 0" 41 "Seccomp: 0"
42} 42}
43sleep 1 43after 100
44 44
45puts "\n" 45puts "all done\n"
diff --git a/test/net_local.exp b/test/net_local.exp
index 9302ec4ef..032c0427d 100755
--- a/test/net_local.exp
+++ b/test/net_local.exp
@@ -5,7 +5,7 @@ spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7# check ip address 7# check ip address
8send -- "firejail --debug\r" 8send -- "firejail --noprofile --debug\r"
9expect { 9expect {
10 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
11 "Using the local network stack" 11 "Using the local network stack"
@@ -19,7 +19,7 @@ send -- "exit\r"
19sleep 2 19sleep 2
20 20
21# check loopback 21# check loopback
22send -- "firejail\r" 22send -- "firejail --noprofile\r"
23expect { 23expect {
24 timeout {puts "TESTING ERROR 9\n";exit} 24 timeout {puts "TESTING ERROR 9\n";exit}
25 "Child process initialized" 25 "Child process initialized"
@@ -45,5 +45,5 @@ expect {
45 "UP" 45 "UP"
46} 46}
47 47
48puts "\n" 48puts "all done\n"
49 49
diff --git a/test/net_netfilter.exp b/test/net_netfilter.exp
index 8583d4625..989fcc407 100755
--- a/test/net_netfilter.exp
+++ b/test/net_netfilter.exp
@@ -5,7 +5,7 @@ spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7# check default netfilter on br0 7# check default netfilter on br0
8send -- "firejail --debug --net=br0 --ip=10.10.20.5 --netfilter\r" 8send -- "firejail --debug --noprofile --net=br0 --ip=10.10.20.5 --netfilter\r"
9expect { 9expect {
10 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
11 "Installing network filter" 11 "Installing network filter"
@@ -31,7 +31,7 @@ send -- "exit\r"
31sleep 1 31sleep 1
32 32
33# check default netfilter no new network 33# check default netfilter no new network
34send -- "firejail --debug --netfilter\r" 34send -- "firejail --debug --noprofile --netfilter\r"
35expect { 35expect {
36 timeout {puts "TESTING ERROR 5\n";exit} 36 timeout {puts "TESTING ERROR 5\n";exit}
37 "Installing network filter" {puts "TESTING ERROR 5.1\n";exit} 37 "Installing network filter" {puts "TESTING ERROR 5.1\n";exit}
@@ -45,7 +45,7 @@ send -- "exit\r"
45sleep 1 45sleep 1
46 46
47# check file filter netfilter on br0 47# check file filter netfilter on br0
48send -- "firejail --debug --net=br0 --ip=10.10.20.5 --netfilter=netfilter.filter\r" 48send -- "firejail --debug --noprofile --net=br0 --ip=10.10.20.5 --netfilter=netfilter.filter\r"
49expect { 49expect {
50 timeout {puts "TESTING ERROR 6\n";exit} 50 timeout {puts "TESTING ERROR 6\n";exit}
51 "Installing network filter" 51 "Installing network filter"
@@ -82,7 +82,7 @@ expect {
82} 82}
83 83
84send -- "exit\r" 84send -- "exit\r"
85sleep 1 85after 100
86 86
87puts "\n" 87puts "all done\n"
88 88
diff --git a/test/net_noip.exp b/test/net_noip.exp
index 3db67885d..8d28adb39 100755
--- a/test/net_noip.exp
+++ b/test/net_noip.exp
@@ -5,7 +5,7 @@ spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7# check ip address 7# check ip address
8send -- "firejail --net=br0 --ip=none\r" 8send -- "firejail --noprofile --net=br0 --ip=none\r"
9expect { 9expect {
10 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
11 "eth0" {puts "TESTING ERROR 1\n";exit} 11 "eth0" {puts "TESTING ERROR 1\n";exit}
@@ -35,7 +35,7 @@ expect {
35 timeout {puts "TESTING ERROR 6\n";exit} 35 timeout {puts "TESTING ERROR 6\n";exit}
36 "home" 36 "home"
37} 37}
38sleep 1 38after 100
39 39
40puts "\n" 40puts "all done\n"
41 41
diff --git a/test/net_noip2.exp b/test/net_noip2.exp
index 234aec8a8..58f90422b 100755
--- a/test/net_noip2.exp
+++ b/test/net_noip2.exp
@@ -5,7 +5,7 @@ spawn $env(SHELL)
5match_max 100000 5match_max 100000
6 6
7# check ip address 7# check ip address
8send -- "firejail --net=br1 --ip=none --defaultgw=10.10.30.78\r" 8send -- "firejail --noprofile --net=br1 --ip=none --defaultgw=10.10.30.78\r"
9expect { 9expect {
10 timeout {puts "TESTING ERROR 0\n";exit} 10 timeout {puts "TESTING ERROR 0\n";exit}
11 "eth0" {puts "TESTING ERROR 1\n";exit} 11 "eth0" {puts "TESTING ERROR 1\n";exit}
@@ -35,7 +35,7 @@ expect {
35 timeout {puts "TESTING ERROR 6\n";exit} 35 timeout {puts "TESTING ERROR 6\n";exit}
36 "home" 36 "home"
37} 37}
38sleep 1 38after 100
39 39
40puts "\n" 40puts "all done\n"
41 41