diff options
author | 2015-08-27 12:37:57 -0400 | |
---|---|---|
committer | 2015-08-27 12:37:57 -0400 | |
commit | 746b6aa3b8bd5f8482078925901f09ed0f45c0b3 (patch) | |
tree | 51af66cf8652bdb895aa9346bd085ce95741e226 /test/firemon-caps.exp | |
parent | Merge pull request #46 from iiotx/master (diff) | |
download | firejail-746b6aa3b8bd5f8482078925901f09ed0f45c0b3.tar.gz firejail-746b6aa3b8bd5f8482078925901f09ed0f45c0b3.tar.zst firejail-746b6aa3b8bd5f8482078925901f09ed0f45c0b3.zip |
testing
Diffstat (limited to 'test/firemon-caps.exp')
-rwxr-xr-x | test/firemon-caps.exp | 61 |
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 | |||
4 | spawn $env(SHELL) | 4 | spawn $env(SHELL) |
5 | match_max 100000 | 5 | match_max 100000 |
6 | 6 | ||
7 | send -- "firejail --name=bingo1 --caps\r" | 7 | send -- "firejail --name=bingo1 --noprofile --caps\r" |
8 | expect { | 8 | expect { |
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 { | |||
12 | sleep 1 | 12 | sleep 1 |
13 | 13 | ||
14 | spawn $env(SHELL) | 14 | spawn $env(SHELL) |
15 | send -- "firejail --name=bingo2\r" | 15 | send -- "firejail --name=bingo2 --noprofile\r" |
16 | expect { | 16 | expect { |
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 | } |
20 | sleep 1 | 20 | sleep 1 |
21 | 21 | ||
22 | spawn $env(SHELL) | 22 | spawn $env(SHELL) |
23 | send -- "firejail --name=bingo3 --caps.drop=all\r" | 23 | send -- "firejail --name=bingo3 --noprofile --caps.drop=all\r" |
24 | expect { | 24 | expect { |
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 | } |
28 | sleep 1 | 28 | sleep 1 |
29 | 29 | ||
30 | spawn $env(SHELL) | 30 | spawn $env(SHELL) |
31 | send -- "firejail --name=bingo4 --caps.drop=chown,kill\r" | 31 | send -- "firejail --noprofile --name=bingo4 --caps.drop=chown,kill\r" |
32 | expect { | 32 | expect { |
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 | } |
36 | sleep 1 | 36 | sleep 1 |
37 | 37 | ||
38 | spawn $env(SHELL) | 38 | spawn $env(SHELL) |
39 | send -- "firejail --name=bingo5 --caps.keep=chown,kill\r" | 39 | send -- "firejail --noprofile --name=bingo5 --caps.keep=chown,kill\r" |
40 | expect { | 40 | expect { |
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 | } |
44 | sleep 1 | 44 | sleep 1 |
@@ -46,7 +46,7 @@ sleep 1 | |||
46 | spawn $env(SHELL) | 46 | spawn $env(SHELL) |
47 | send -- "firejail --name=bingo6 --profile=caps1.profile\r" | 47 | send -- "firejail --name=bingo6 --profile=caps1.profile\r" |
48 | expect { | 48 | expect { |
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 | } |
52 | sleep 1 | 52 | sleep 1 |
@@ -59,77 +59,68 @@ expect { | |||
59 | } | 59 | } |
60 | sleep 1 | 60 | sleep 1 |
61 | 61 | ||
62 | |||
63 | |||
64 | |||
65 | spawn $env(SHELL) | 62 | spawn $env(SHELL) |
66 | send -- "firemon --caps\r" | 63 | send -- "firemon --caps\r" |
67 | expect { | 64 | expect { |
68 | timeout {puts "TESTING ERROR 1\n";exit} | 65 | timeout {puts "TESTING ERROR 8.1\n";exit} |
69 | "bingo1" | 66 | "bingo1" |
70 | } | 67 | } |
71 | expect { | 68 | expect { |
72 | timeout {puts "TESTING ERROR 2\n";exit} | 69 | timeout {puts "TESTING ERROR 8.2\n";exit} |
73 | "31cffff" | 70 | "31cffff" |
74 | } | 71 | } |
75 | expect { | 72 | expect { |
76 | timeout {puts "TESTING ERROR 3\n";exit} | 73 | timeout {puts "TESTING ERROR 8.3\n";exit} |
77 | "bingo2" | 74 | "bingo2" |
78 | } | 75 | } |
79 | expect { | 76 | expect { |
80 | timeout {puts "TESTING ERROR 4\n";exit} | 77 | timeout {puts "TESTING ERROR 8.4\n";exit} |
81 | "fffffff" | 78 | "fffffff" |
82 | } | 79 | } |
83 | expect { | 80 | expect { |
84 | timeout {puts "TESTING ERROR 5\n";exit} | 81 | timeout {puts "TESTING ERROR 8.5\n";exit} |
85 | "bingo3" | 82 | "bingo3" |
86 | } | 83 | } |
87 | expect { | 84 | expect { |
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 | ||
92 | expect { | 89 | expect { |
93 | timeout {puts "TESTING ERROR 7\n";exit} | 90 | timeout {puts "TESTING ERROR 8.7\n";exit} |
94 | "bingo4" | 91 | "bingo4" |
95 | } | 92 | } |
96 | expect { | 93 | expect { |
97 | timeout {puts "TESTING ERROR 8\n";exit} | 94 | timeout {puts "TESTING ERROR 8.8\n";exit} |
98 | "ffffffde" | 95 | "ffffffde" |
99 | } | 96 | } |
100 | expect { | 97 | expect { |
101 | timeout {puts "TESTING ERROR 7\n";exit} | 98 | timeout {puts "TESTING ERROR 8.9\n";exit} |
102 | "bingo5" | 99 | "bingo5" |
103 | } | 100 | } |
104 | expect { | 101 | expect { |
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 | ||
109 | expect { | 106 | expect { |
110 | timeout {puts "TESTING ERROR 10\n";exit} | 107 | timeout {puts "TESTING ERROR 8.11\n";exit} |
111 | "bingo6" | 108 | "bingo6" |
112 | } | 109 | } |
113 | expect { | 110 | expect { |
114 | timeout {puts "TESTING ERROR 11\n";exit} | 111 | timeout {puts "TESTING ERROR 8.12\n";exit} |
115 | "ffffffde" | 112 | "ffffffde" |
116 | } | 113 | } |
117 | expect { | 114 | expect { |
118 | timeout {puts "TESTING ERROR 12\n";exit} | 115 | timeout {puts "TESTING ERROR 8.13\n";exit} |
119 | "bingo7" | 116 | "bingo7" |
120 | } | 117 | } |
121 | expect { | 118 | expect { |
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 | ||
123 | after 100 | ||
126 | 124 | ||
127 | 125 | puts "all done\n" | |
128 | |||
129 | |||
130 | |||
131 | |||
132 | sleep 1 | ||
133 | |||
134 | puts "\n" | ||
135 | 126 | ||