aboutsummaryrefslogtreecommitdiffstats
path: root/test/firemon-caps.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/firemon-caps.exp')
-rwxr-xr-xtest/firemon-caps.exp61
1 files changed, 26 insertions, 35 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