diff options
author | smitsohu <smitsohu@gmail.com> | 2022-02-09 18:04:36 +0100 |
---|---|---|
committer | smitsohu <smitsohu@gmail.com> | 2022-02-09 18:30:45 +0100 |
commit | 7578e86ef8ddb78da44d426b94def77366627e0e (patch) | |
tree | e752d23f1b61a50fb7b7372d6799fe9ef4d111e4 /test/fs | |
parent | Merge pull request #4915 from kmk3/keepassx-restore-nou2f (diff) | |
download | firejail-7578e86ef8ddb78da44d426b94def77366627e0e.tar.gz firejail-7578e86ef8ddb78da44d426b94def77366627e0e.tar.zst firejail-7578e86ef8ddb78da44d426b94def77366627e0e.zip |
testing: fix expect matching of numbers
The sandbox timestamp should not be available for matching
when output is already expected from the next command
(this is only a problem if numeric output if expected from the
first command in the sandbox).
A possible alternative would be to flush the expect output buffer
with 'expect "*"' after the sandbox is up.
Diffstat (limited to 'test/fs')
31 files changed, 58 insertions, 58 deletions
diff --git a/test/fs/fs_dev_shm.exp b/test/fs/fs_dev_shm.exp index 0c819fe99..5d57a8975 100755 --- a/test/fs/fs_dev_shm.exp +++ b/test/fs/fs_dev_shm.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail\r" | 11 | send -- "firejail\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | after 100 | 16 | after 100 |
17 | send -- "stty -echo\r" | 17 | send -- "stty -echo\r" |
@@ -52,7 +52,7 @@ sleep 1 | |||
52 | send -- "firejail\r" | 52 | send -- "firejail\r" |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 7\n";exit} | 54 | timeout {puts "TESTING ERROR 7\n";exit} |
55 | "Child process initialized" | 55 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
56 | } | 56 | } |
57 | after 100 | 57 | after 100 |
58 | send -- "stty -echo\r" | 58 | send -- "stty -echo\r" |
diff --git a/test/fs/fs_var_lock.exp b/test/fs/fs_var_lock.exp index e2efd389d..ce3eb836e 100755 --- a/test/fs/fs_var_lock.exp +++ b/test/fs/fs_var_lock.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail\r" | 11 | send -- "firejail\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | after 100 | 16 | after 100 |
17 | send -- "stty -echo\r" | 17 | send -- "stty -echo\r" |
@@ -53,7 +53,7 @@ sleep 1 | |||
53 | send -- "firejail\r" | 53 | send -- "firejail\r" |
54 | expect { | 54 | expect { |
55 | timeout {puts "TESTING ERROR 7\n";exit} | 55 | timeout {puts "TESTING ERROR 7\n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | after 100 | 58 | after 100 |
59 | send -- "stty -echo\r" | 59 | send -- "stty -echo\r" |
diff --git a/test/fs/fs_var_tmp.exp b/test/fs/fs_var_tmp.exp index b8e7ea73d..8c2da085f 100755 --- a/test/fs/fs_var_tmp.exp +++ b/test/fs/fs_var_tmp.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail\r" | 11 | send -- "firejail\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | after 100 | 16 | after 100 |
17 | send -- "stty -echo\r" | 17 | send -- "stty -echo\r" |
@@ -53,7 +53,7 @@ sleep 1 | |||
53 | send -- "firejail\r" | 53 | send -- "firejail\r" |
54 | expect { | 54 | expect { |
55 | timeout {puts "TESTING ERROR 7\n";exit} | 55 | timeout {puts "TESTING ERROR 7\n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | after 100 | 58 | after 100 |
59 | send -- "stty -echo\r" | 59 | send -- "stty -echo\r" |
diff --git a/test/fs/fscheck-tmpfs.exp b/test/fs/fscheck-tmpfs.exp index c9d237d72..223bb63ba 100755 --- a/test/fs/fscheck-tmpfs.exp +++ b/test/fs/fscheck-tmpfs.exp | |||
@@ -24,7 +24,7 @@ if { ! [file exists /tmp/fjtest-dir] } { | |||
24 | send -- "firejail --noprofile --tmpfs=~/fjtest-dir\r" | 24 | send -- "firejail --noprofile --tmpfs=~/fjtest-dir\r" |
25 | expect { | 25 | expect { |
26 | timeout {puts "TESTING ERROR 3\n";exit} | 26 | timeout {puts "TESTING ERROR 3\n";exit} |
27 | "Child process initialized" | 27 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
28 | } | 28 | } |
29 | after 500 | 29 | after 500 |
30 | 30 | ||
diff --git a/test/fs/kmsg.exp b/test/fs/kmsg.exp index acaca2cd0..e7d765bff 100755 --- a/test/fs/kmsg.exp +++ b/test/fs/kmsg.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail\r" | 10 | send -- "firejail\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
diff --git a/test/fs/macro.exp b/test/fs/macro.exp index 1d32a9cd0..c01123f41 100755 --- a/test/fs/macro.exp +++ b/test/fs/macro.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --profile=macro-whitelist.profile ls ~\r" | 11 | send -- "firejail --profile=macro-whitelist.profile ls ~\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 1\n";exit} | 17 | timeout {puts "TESTING ERROR 1\n";exit} |
@@ -42,7 +42,7 @@ sleep 1 | |||
42 | send -- "firejail --profile=macro-blacklist.profile ls ~/Desktop\r" | 42 | send -- "firejail --profile=macro-blacklist.profile ls ~/Desktop\r" |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 7\n";exit} | 44 | timeout {puts "TESTING ERROR 7\n";exit} |
45 | "Child process initialized" | 45 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
46 | } | 46 | } |
47 | expect { | 47 | expect { |
48 | timeout {puts "TESTING ERROR 8\n";exit} | 48 | timeout {puts "TESTING ERROR 8\n";exit} |
@@ -53,7 +53,7 @@ sleep 1 | |||
53 | send -- "firejail --profile=macro-blacklist.profile ls ~/Documents\r" | 53 | send -- "firejail --profile=macro-blacklist.profile ls ~/Documents\r" |
54 | expect { | 54 | expect { |
55 | timeout {puts "TESTING ERROR 9n";exit} | 55 | timeout {puts "TESTING ERROR 9n";exit} |
56 | "Child process initialized" | 56 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
57 | } | 57 | } |
58 | expect { | 58 | expect { |
59 | timeout {puts "TESTING ERROR 10\n";exit} | 59 | timeout {puts "TESTING ERROR 10\n";exit} |
@@ -64,7 +64,7 @@ sleep 1 | |||
64 | send -- "firejail --profile=macro-blacklist.profile ls ~/Downloads\r" | 64 | send -- "firejail --profile=macro-blacklist.profile ls ~/Downloads\r" |
65 | expect { | 65 | expect { |
66 | timeout {puts "TESTING ERROR 11n";exit} | 66 | timeout {puts "TESTING ERROR 11n";exit} |
67 | "Child process initialized" | 67 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
68 | } | 68 | } |
69 | expect { | 69 | expect { |
70 | timeout {puts "TESTING ERROR 12n";exit} | 70 | timeout {puts "TESTING ERROR 12n";exit} |
@@ -75,7 +75,7 @@ sleep 1 | |||
75 | send -- "firejail --profile=macro-blacklist.profile ls ~/Music\r" | 75 | send -- "firejail --profile=macro-blacklist.profile ls ~/Music\r" |
76 | expect { | 76 | expect { |
77 | timeout {puts "TESTING ERROR 13\n";exit} | 77 | timeout {puts "TESTING ERROR 13\n";exit} |
78 | "Child process initialized" | 78 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
79 | } | 79 | } |
80 | expect { | 80 | expect { |
81 | timeout {puts "TESTING ERROR 14\n";exit} | 81 | timeout {puts "TESTING ERROR 14\n";exit} |
@@ -86,7 +86,7 @@ sleep 1 | |||
86 | send -- "firejail --profile=macro-blacklist.profile ls ~/Pictures\r" | 86 | send -- "firejail --profile=macro-blacklist.profile ls ~/Pictures\r" |
87 | expect { | 87 | expect { |
88 | timeout {puts "TESTING ERROR 15\n";exit} | 88 | timeout {puts "TESTING ERROR 15\n";exit} |
89 | "Child process initialized" | 89 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
90 | } | 90 | } |
91 | expect { | 91 | expect { |
92 | timeout {puts "TESTING ERROR 16\n";exit} | 92 | timeout {puts "TESTING ERROR 16\n";exit} |
@@ -97,7 +97,7 @@ sleep 1 | |||
97 | send -- "firejail --profile=macro-blacklist.profile ls ~/Videos\r" | 97 | send -- "firejail --profile=macro-blacklist.profile ls ~/Videos\r" |
98 | expect { | 98 | expect { |
99 | timeout {puts "TESTING ERROR 17\n";exit} | 99 | timeout {puts "TESTING ERROR 17\n";exit} |
100 | "Child process initialized" | 100 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
101 | } | 101 | } |
102 | expect { | 102 | expect { |
103 | timeout {puts "TESTING ERROR 18\n";exit} | 103 | timeout {puts "TESTING ERROR 18\n";exit} |
@@ -108,7 +108,7 @@ sleep 1 | |||
108 | send -- "firejail --profile=macro-readonly.profile touch ~/Desktop/blablabla\r" | 108 | send -- "firejail --profile=macro-readonly.profile touch ~/Desktop/blablabla\r" |
109 | expect { | 109 | expect { |
110 | timeout {puts "TESTING ERROR 19\n";exit} | 110 | timeout {puts "TESTING ERROR 19\n";exit} |
111 | "Child process initialized" | 111 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
112 | } | 112 | } |
113 | expect { | 113 | expect { |
114 | timeout {puts "TESTING ERROR 20\n";exit} | 114 | timeout {puts "TESTING ERROR 20\n";exit} |
@@ -119,7 +119,7 @@ sleep 1 | |||
119 | send -- "firejail --profile=macro-readonly.profile touch ~/Documents/blablabla\r" | 119 | send -- "firejail --profile=macro-readonly.profile touch ~/Documents/blablabla\r" |
120 | expect { | 120 | expect { |
121 | timeout {puts "TESTING ERROR 21\n";exit} | 121 | timeout {puts "TESTING ERROR 21\n";exit} |
122 | "Child process initialized" | 122 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
123 | } | 123 | } |
124 | expect { | 124 | expect { |
125 | timeout {puts "TESTING ERROR 22\n";exit} | 125 | timeout {puts "TESTING ERROR 22\n";exit} |
@@ -130,7 +130,7 @@ sleep 1 | |||
130 | send -- "firejail --profile=macro-readonly.profile touch ~/Downloads/blablabla\r" | 130 | send -- "firejail --profile=macro-readonly.profile touch ~/Downloads/blablabla\r" |
131 | expect { | 131 | expect { |
132 | timeout {puts "TESTING ERROR 23\n";exit} | 132 | timeout {puts "TESTING ERROR 23\n";exit} |
133 | "Child process initialized" | 133 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
134 | } | 134 | } |
135 | expect { | 135 | expect { |
136 | timeout {puts "TESTING ERROR 24\n";exit} | 136 | timeout {puts "TESTING ERROR 24\n";exit} |
@@ -141,7 +141,7 @@ sleep 1 | |||
141 | send -- "firejail --profile=macro-readonly.profile touch ~/Music/blablabla\r" | 141 | send -- "firejail --profile=macro-readonly.profile touch ~/Music/blablabla\r" |
142 | expect { | 142 | expect { |
143 | timeout {puts "TESTING ERROR 25\n";exit} | 143 | timeout {puts "TESTING ERROR 25\n";exit} |
144 | "Child process initialized" | 144 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
145 | } | 145 | } |
146 | expect { | 146 | expect { |
147 | timeout {puts "TESTING ERROR 26\n";exit} | 147 | timeout {puts "TESTING ERROR 26\n";exit} |
@@ -152,7 +152,7 @@ sleep 1 | |||
152 | send -- "firejail --profile=macro-readonly.profile touch ~/Pictures/blablabla\r" | 152 | send -- "firejail --profile=macro-readonly.profile touch ~/Pictures/blablabla\r" |
153 | expect { | 153 | expect { |
154 | timeout {puts "TESTING ERROR 27\n";exit} | 154 | timeout {puts "TESTING ERROR 27\n";exit} |
155 | "Child process initialized" | 155 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
156 | } | 156 | } |
157 | expect { | 157 | expect { |
158 | timeout {puts "TESTING ERROR 28\n";exit} | 158 | timeout {puts "TESTING ERROR 28\n";exit} |
@@ -163,7 +163,7 @@ sleep 1 | |||
163 | send -- "firejail --profile=macro-readonly.profile touch ~/Videos/blablabla\r" | 163 | send -- "firejail --profile=macro-readonly.profile touch ~/Videos/blablabla\r" |
164 | expect { | 164 | expect { |
165 | timeout {puts "TESTING ERROR 29\n";exit} | 165 | timeout {puts "TESTING ERROR 29\n";exit} |
166 | "Child process initialized" | 166 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
167 | } | 167 | } |
168 | expect { | 168 | expect { |
169 | timeout {puts "TESTING ERROR 30\n";exit} | 169 | timeout {puts "TESTING ERROR 30\n";exit} |
diff --git a/test/fs/mkdir_mkfile.exp b/test/fs/mkdir_mkfile.exp index 406f2c87f..c1dce58ea 100755 --- a/test/fs/mkdir_mkfile.exp +++ b/test/fs/mkdir_mkfile.exp | |||
@@ -12,7 +12,7 @@ match_max 100000 | |||
12 | send -- "firejail --private --profile=mkdir_mkfile.profile\r" | 12 | send -- "firejail --private --profile=mkdir_mkfile.profile\r" |
13 | expect { | 13 | expect { |
14 | timeout {puts "TESTING ERROR 0\n";exit} | 14 | timeout {puts "TESTING ERROR 0\n";exit} |
15 | "Child process initialized" | 15 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | 18 | ||
diff --git a/test/fs/noblacklist-blacklist-noexec.exp b/test/fs/noblacklist-blacklist-noexec.exp index 7a3fb8263..3bc5e7c79 100755 --- a/test/fs/noblacklist-blacklist-noexec.exp +++ b/test/fs/noblacklist-blacklist-noexec.exp | |||
@@ -12,7 +12,7 @@ set PWD $env(PWD) | |||
12 | send -- "firejail --noprofile --noblacklist=$PWD --blacklist=$PWD --noexec=$PWD\r" | 12 | send -- "firejail --noprofile --noblacklist=$PWD --blacklist=$PWD --noexec=$PWD\r" |
13 | expect { | 13 | expect { |
14 | timeout {puts "TESTING ERROR 0\n";exit} | 14 | timeout {puts "TESTING ERROR 0\n";exit} |
15 | "Child process initialized" | 15 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | 18 | ||
diff --git a/test/fs/noblacklist-blacklist-readonly.exp b/test/fs/noblacklist-blacklist-readonly.exp index d164184e7..b5d3ef045 100755 --- a/test/fs/noblacklist-blacklist-readonly.exp +++ b/test/fs/noblacklist-blacklist-readonly.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --noprofile --noblacklist=~ --blacklist=~ --read-only=~\r" | 11 | send -- "firejail --noprofile --noblacklist=~ --blacklist=~ --read-only=~\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 0\n";exit} | 13 | timeout {puts "TESTING ERROR 0\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | sleep 1 | 16 | sleep 1 |
17 | 17 | ||
diff --git a/test/fs/option_blacklist.exp b/test/fs/option_blacklist.exp index f3e1ec5a1..9e1533435 100755 --- a/test/fs/option_blacklist.exp +++ b/test/fs/option_blacklist.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --blacklist=/var\r" | 10 | send -- "firejail --blacklist=/var\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | after 100 | 15 | after 100 |
16 | send -- "stty -echo\r" | 16 | send -- "stty -echo\r" |
diff --git a/test/fs/option_blacklist_file.exp b/test/fs/option_blacklist_file.exp index 638c25f6a..93284a140 100755 --- a/test/fs/option_blacklist_file.exp +++ b/test/fs/option_blacklist_file.exp | |||
@@ -15,7 +15,7 @@ after 100 | |||
15 | send -- "firejail --blacklist=/etc/passwd --blacklist=~/_firejail_test_dir\r" | 15 | send -- "firejail --blacklist=/etc/passwd --blacklist=~/_firejail_test_dir\r" |
16 | expect { | 16 | expect { |
17 | timeout {puts "TESTING ERROR 0\n";exit} | 17 | timeout {puts "TESTING ERROR 0\n";exit} |
18 | "Child process initialized" | 18 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
19 | } | 19 | } |
20 | sleep 1 | 20 | sleep 1 |
21 | 21 | ||
diff --git a/test/fs/option_blacklist_glob.exp b/test/fs/option_blacklist_glob.exp index bea08767e..83b123a4b 100755 --- a/test/fs/option_blacklist_glob.exp +++ b/test/fs/option_blacklist_glob.exp | |||
@@ -19,7 +19,7 @@ after 100 | |||
19 | send -- "firejail --blacklist=~/_firejail_test_dir/*\r" | 19 | send -- "firejail --blacklist=~/_firejail_test_dir/*\r" |
20 | expect { | 20 | expect { |
21 | timeout {puts "TESTING ERROR 0\n";exit} | 21 | timeout {puts "TESTING ERROR 0\n";exit} |
22 | "Child process initialized" | 22 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
23 | } | 23 | } |
24 | sleep 1 | 24 | sleep 1 |
25 | send -- "cd ~/_firejail_test_dir\r" | 25 | send -- "cd ~/_firejail_test_dir\r" |
diff --git a/test/fs/private-bin.exp b/test/fs/private-bin.exp index 301141579..e4b36e114 100755 --- a/test/fs/private-bin.exp +++ b/test/fs/private-bin.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --private-bin=bash,ls,sh\r" | 10 | send -- "firejail --private-bin=bash,ls,sh\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
@@ -40,7 +40,7 @@ sleep 1 | |||
40 | send -- "firejail --profile=private-bin.profile\r" | 40 | send -- "firejail --profile=private-bin.profile\r" |
41 | expect { | 41 | expect { |
42 | timeout {puts "TESTING ERROR 7\n";exit} | 42 | timeout {puts "TESTING ERROR 7\n";exit} |
43 | "Child process initialized" | 43 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
44 | } | 44 | } |
45 | sleep 1 | 45 | sleep 1 |
46 | 46 | ||
diff --git a/test/fs/private-cache.exp b/test/fs/private-cache.exp index 4abfdcef0..f21d799b4 100755 --- a/test/fs/private-cache.exp +++ b/test/fs/private-cache.exp | |||
@@ -21,7 +21,7 @@ if { ! [file exists ~/.cache/abcdefg] } { | |||
21 | send -- "firejail --noprofile --private-cache\r" | 21 | send -- "firejail --noprofile --private-cache\r" |
22 | expect { | 22 | expect { |
23 | timeout {puts "TESTING ERROR 1\n";exit} | 23 | timeout {puts "TESTING ERROR 1\n";exit} |
24 | "Child process initialized" | 24 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
25 | } | 25 | } |
26 | sleep 1 | 26 | sleep 1 |
27 | 27 | ||
diff --git a/test/fs/private-etc-empty.exp b/test/fs/private-etc-empty.exp index f1ced02c7..6878a642c 100755 --- a/test/fs/private-etc-empty.exp +++ b/test/fs/private-etc-empty.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --private-etc=blablabla\r" | 10 | send -- "firejail --private-etc=blablabla\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
@@ -26,7 +26,7 @@ sleep 1 | |||
26 | send -- "firejail --profile=private-etc-empty.profile\r" | 26 | send -- "firejail --profile=private-etc-empty.profile\r" |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 0\n";exit} | 28 | timeout {puts "TESTING ERROR 0\n";exit} |
29 | "Child process initialized" | 29 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
30 | } | 30 | } |
31 | sleep 1 | 31 | sleep 1 |
32 | 32 | ||
diff --git a/test/fs/private-etc.exp b/test/fs/private-etc.exp index 2b7fcd83d..f51fc5221 100755 --- a/test/fs/private-etc.exp +++ b/test/fs/private-etc.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r" | 11 | send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 1\n";exit} | 13 | timeout {puts "TESTING ERROR 1\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | sleep 1 | 16 | sleep 1 |
17 | 17 | ||
diff --git a/test/fs/private-home-dir.exp b/test/fs/private-home-dir.exp index 14eebaf8b..e46d2b113 100755 --- a/test/fs/private-home-dir.exp +++ b/test/fs/private-home-dir.exp | |||
@@ -30,7 +30,7 @@ sleep 1 | |||
30 | send -- "firejail --private=~/_firejail_test_dir1_\r" | 30 | send -- "firejail --private=~/_firejail_test_dir1_\r" |
31 | expect { | 31 | expect { |
32 | timeout {puts "TESTING ERROR 0\n";exit} | 32 | timeout {puts "TESTING ERROR 0\n";exit} |
33 | "Child process initialized" | 33 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
34 | } | 34 | } |
35 | sleep 1 | 35 | sleep 1 |
36 | 36 | ||
@@ -83,7 +83,7 @@ expect { | |||
83 | } | 83 | } |
84 | expect { | 84 | expect { |
85 | timeout {puts "TESTING ERROR 12\n";exit} | 85 | timeout {puts "TESTING ERROR 12\n";exit} |
86 | "Child process initialized" | 86 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
87 | } | 87 | } |
88 | 88 | ||
89 | sleep 1 | 89 | sleep 1 |
diff --git a/test/fs/private-home.exp b/test/fs/private-home.exp index fbe40a89b..99456a211 100755 --- a/test/fs/private-home.exp +++ b/test/fs/private-home.exp | |||
@@ -26,7 +26,7 @@ after 100 | |||
26 | send -- "firejail --private-home=_firejail_test_file1,_firejail_test_file2,_firejail_test_dir1\r" | 26 | send -- "firejail --private-home=_firejail_test_file1,_firejail_test_file2,_firejail_test_dir1\r" |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 1\n";exit} | 28 | timeout {puts "TESTING ERROR 1\n";exit} |
29 | "Child process initialized" | 29 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
30 | } | 30 | } |
31 | after 100 | 31 | after 100 |
32 | 32 | ||
@@ -86,7 +86,7 @@ after 100 | |||
86 | send -- "firejail --private-home=_firejail_test_link2\r" | 86 | send -- "firejail --private-home=_firejail_test_link2\r" |
87 | expect { | 87 | expect { |
88 | timeout {puts "TESTING ERROR 10\n";exit} | 88 | timeout {puts "TESTING ERROR 10\n";exit} |
89 | "Child process initialized" | 89 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
90 | } | 90 | } |
91 | after 100 | 91 | after 100 |
92 | send -- "file ~/_firejail_test_link2\r" | 92 | send -- "file ~/_firejail_test_link2\r" |
diff --git a/test/fs/private-homedir.exp b/test/fs/private-homedir.exp index f14d20c7b..0b4348514 100755 --- a/test/fs/private-homedir.exp +++ b/test/fs/private-homedir.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --private=~\r" | 10 | send -- "firejail --private=~\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | after 100 | 15 | after 100 |
16 | 16 | ||
diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp index 6ad48beb7..5290def35 100755 --- a/test/fs/private-lib.exp +++ b/test/fs/private-lib.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r" | 11 | send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r" |
12 | expect { | 12 | expect { |
13 | timeout {puts "TESTING ERROR 1\n";exit} | 13 | timeout {puts "TESTING ERROR 1\n";exit} |
14 | "Child process initialized" | 14 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
15 | } | 15 | } |
16 | after 100 | 16 | after 100 |
17 | send -- "stty -echo\r" | 17 | send -- "stty -echo\r" |
diff --git a/test/fs/private-whitelist.exp b/test/fs/private-whitelist.exp index 1c2a13d16..48add880c 100755 --- a/test/fs/private-whitelist.exp +++ b/test/fs/private-whitelist.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --private --whitelist=/tmp/.X11-unix\r" | 10 | send -- "firejail --private --whitelist=/tmp/.X11-unix\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | after 100 | 15 | after 100 |
16 | 16 | ||
diff --git a/test/fs/private.exp b/test/fs/private.exp index d2cac6b05..ff8e0c66e 100755 --- a/test/fs/private.exp +++ b/test/fs/private.exp | |||
@@ -26,7 +26,7 @@ after 100 | |||
26 | send -- "firejail --private\r" | 26 | send -- "firejail --private\r" |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 0\n";exit} | 28 | timeout {puts "TESTING ERROR 0\n";exit} |
29 | "Child process initialized" | 29 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
30 | } | 30 | } |
31 | sleep 1 | 31 | sleep 1 |
32 | 32 | ||
diff --git a/test/fs/read-write.exp b/test/fs/read-write.exp index 138834209..f0ef0842c 100755 --- a/test/fs/read-write.exp +++ b/test/fs/read-write.exp | |||
@@ -19,7 +19,7 @@ after 100 | |||
19 | send -- "firejail --read-only=~/_firejail_test_dir --read-write=~/_firejail_test_dir/test1\r" | 19 | send -- "firejail --read-only=~/_firejail_test_dir --read-write=~/_firejail_test_dir/test1\r" |
20 | expect { | 20 | expect { |
21 | timeout {puts "TESTING ERROR 0\n";exit} | 21 | timeout {puts "TESTING ERROR 0\n";exit} |
22 | "Child process initialized" | 22 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
23 | } | 23 | } |
24 | sleep 1 | 24 | sleep 1 |
25 | 25 | ||
diff --git a/test/fs/sys_fs.exp b/test/fs/sys_fs.exp index f501b48ca..ce1fb04de 100755 --- a/test/fs/sys_fs.exp +++ b/test/fs/sys_fs.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail\r" | 10 | send -- "firejail\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 1\n";exit} | 12 | timeout {puts "TESTING ERROR 1\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
@@ -27,7 +27,7 @@ sleep 1 | |||
27 | send -- "firejail --noblacklist=/sys/fs\r" | 27 | send -- "firejail --noblacklist=/sys/fs\r" |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 1\n";exit} | 29 | timeout {puts "TESTING ERROR 1\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | sleep 1 | 32 | sleep 1 |
33 | 33 | ||
diff --git a/test/fs/whitelist-dev.exp b/test/fs/whitelist-dev.exp index 83e6bad49..7459462f8 100755 --- a/test/fs/whitelist-dev.exp +++ b/test/fs/whitelist-dev.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --whitelist=/dev/null --debug\r" | 10 | send -- "firejail --whitelist=/dev/null --debug\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
@@ -26,7 +26,7 @@ sleep 1 | |||
26 | send -- "firejail --whitelist=/dev/null --whitelist=/dev/random\r" | 26 | send -- "firejail --whitelist=/dev/null --whitelist=/dev/random\r" |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 2\n";exit} | 28 | timeout {puts "TESTING ERROR 2\n";exit} |
29 | "Child process initialized" | 29 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
30 | } | 30 | } |
31 | sleep 1 | 31 | sleep 1 |
32 | 32 | ||
@@ -42,7 +42,7 @@ sleep 1 | |||
42 | send -- "firejail --private-dev --debug\r" | 42 | send -- "firejail --private-dev --debug\r" |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 4\n";exit} | 44 | timeout {puts "TESTING ERROR 4\n";exit} |
45 | "Child process initialized" | 45 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
46 | } | 46 | } |
47 | sleep 1 | 47 | sleep 1 |
48 | 48 | ||
@@ -97,7 +97,7 @@ if { $have_snd > 0 } { | |||
97 | send -- "firejail --private-dev --nosound ls /dev\r" | 97 | send -- "firejail --private-dev --nosound ls /dev\r" |
98 | expect { | 98 | expect { |
99 | timeout {puts "TESTING ERROR 7\n";exit} | 99 | timeout {puts "TESTING ERROR 7\n";exit} |
100 | "Child process initialized" | 100 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
101 | } | 101 | } |
102 | expect { | 102 | expect { |
103 | timeout {puts "TESTING ERROR 8\n";exit} | 103 | timeout {puts "TESTING ERROR 8\n";exit} |
@@ -114,7 +114,7 @@ if { $have_dvd > 0 } { | |||
114 | send -- "firejail --private-dev --nodvd ls /dev\r" | 114 | send -- "firejail --private-dev --nodvd ls /dev\r" |
115 | expect { | 115 | expect { |
116 | timeout {puts "TESTING ERROR 10\n";exit} | 116 | timeout {puts "TESTING ERROR 10\n";exit} |
117 | "Child process initialized" | 117 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
118 | } | 118 | } |
119 | expect { | 119 | expect { |
120 | timeout {puts "TESTING ERROR 11\n";exit} | 120 | timeout {puts "TESTING ERROR 11\n";exit} |
@@ -135,7 +135,7 @@ if { $have_dri > 0 } { | |||
135 | send -- "firejail --private-dev --no3d ls /dev\r" | 135 | send -- "firejail --private-dev --no3d ls /dev\r" |
136 | expect { | 136 | expect { |
137 | timeout {puts "TESTING ERROR 17\n";exit} | 137 | timeout {puts "TESTING ERROR 17\n";exit} |
138 | "Child process initialized" | 138 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
139 | } | 139 | } |
140 | expect { | 140 | expect { |
141 | timeout {puts "TESTING ERROR 18\n";exit} | 141 | timeout {puts "TESTING ERROR 18\n";exit} |
diff --git a/test/fs/whitelist-double.exp b/test/fs/whitelist-double.exp index f9eeee038..b3b48f2cd 100755 --- a/test/fs/whitelist-double.exp +++ b/test/fs/whitelist-double.exp | |||
@@ -13,7 +13,7 @@ sleep 1 | |||
13 | send -- "firejail --whitelist=/tmp/_firejail_test_file --whitelist=/tmp/_firejail_test_file\r" | 13 | send -- "firejail --whitelist=/tmp/_firejail_test_file --whitelist=/tmp/_firejail_test_file\r" |
14 | expect { | 14 | expect { |
15 | timeout {puts "TESTING ERROR 0\n";exit} | 15 | timeout {puts "TESTING ERROR 0\n";exit} |
16 | "Child process initialized" | 16 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
17 | } | 17 | } |
18 | sleep 1 | 18 | sleep 1 |
19 | 19 | ||
diff --git a/test/fs/whitelist-empty.exp b/test/fs/whitelist-empty.exp index cd72b3ef9..18d4561d6 100755 --- a/test/fs/whitelist-empty.exp +++ b/test/fs/whitelist-empty.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --whitelist=~/blablabla --whitelist=/tmp/blablabla --whitelist=/media/blablabla --whitelist=/var/blablabla --whitelist=/dev/blablabla --whitelist=/opt/blablabla\r" | 10 | send -- "firejail --whitelist=~/blablabla --whitelist=/tmp/blablabla --whitelist=/media/blablabla --whitelist=/var/blablabla --whitelist=/dev/blablabla --whitelist=/opt/blablabla\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 0\n";exit} | 12 | timeout {puts "TESTING ERROR 0\n";exit} |
13 | "Child process initialized" | 13 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
14 | } | 14 | } |
15 | sleep 1 | 15 | sleep 1 |
16 | 16 | ||
diff --git a/test/fs/whitelist-noexec.exp b/test/fs/whitelist-noexec.exp index d997aba72..ba3ca4d92 100755 --- a/test/fs/whitelist-noexec.exp +++ b/test/fs/whitelist-noexec.exp | |||
@@ -12,7 +12,7 @@ set PWD $env(PWD) | |||
12 | send -- "firejail --noprofile --whitelist=$PWD --noexec=$PWD\r" | 12 | send -- "firejail --noprofile --whitelist=$PWD --noexec=$PWD\r" |
13 | expect { | 13 | expect { |
14 | timeout {puts "TESTING ERROR 0\n";exit} | 14 | timeout {puts "TESTING ERROR 0\n";exit} |
15 | "Child process initialized" | 15 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
16 | } | 16 | } |
17 | sleep 1 | 17 | sleep 1 |
18 | 18 | ||
diff --git a/test/fs/whitelist-readonly.exp b/test/fs/whitelist-readonly.exp index 4c29c746b..676131ade 100755 --- a/test/fs/whitelist-readonly.exp +++ b/test/fs/whitelist-readonly.exp | |||
@@ -19,7 +19,7 @@ after 100 | |||
19 | send -- "firejail --noprofile --whitelist=~/_firejail_test_dir --read-only=~\r" | 19 | send -- "firejail --noprofile --whitelist=~/_firejail_test_dir --read-only=~\r" |
20 | expect { | 20 | expect { |
21 | timeout {puts "TESTING ERROR 0\n";exit} | 21 | timeout {puts "TESTING ERROR 0\n";exit} |
22 | "Child process initialized" | 22 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
23 | } | 23 | } |
24 | sleep 1 | 24 | sleep 1 |
25 | 25 | ||
diff --git a/test/fs/whitelist-whitespace.exp b/test/fs/whitelist-whitespace.exp index 66a4f8549..885b90f2a 100755 --- a/test/fs/whitelist-whitespace.exp +++ b/test/fs/whitelist-whitespace.exp | |||
@@ -13,7 +13,7 @@ after 100 | |||
13 | send -- "firejail --noprofile --whitelist=~/filewith\\\ \\\ many\\\ whitespaces\\\ \r" | 13 | send -- "firejail --noprofile --whitelist=~/filewith\\\ \\\ many\\\ whitespaces\\\ \r" |
14 | expect { | 14 | expect { |
15 | timeout {puts "TESTING ERROR 1\n";exit} | 15 | timeout {puts "TESTING ERROR 1\n";exit} |
16 | "Child process initialized" | 16 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
17 | } | 17 | } |
18 | sleep 1 | 18 | sleep 1 |
19 | 19 | ||
diff --git a/test/fs/whitelist.exp b/test/fs/whitelist.exp index 2a970ca37..8e98b9dfa 100755 --- a/test/fs/whitelist.exp +++ b/test/fs/whitelist.exp | |||
@@ -36,7 +36,7 @@ after 200 | |||
36 | send -- "firejail --whitelist=~/fjtest-file --whitelist=~/fjtest-dir --debug\r" | 36 | send -- "firejail --whitelist=~/fjtest-file --whitelist=~/fjtest-dir --debug\r" |
37 | expect { | 37 | expect { |
38 | timeout {puts "TESTING ERROR 0\n";exit} | 38 | timeout {puts "TESTING ERROR 0\n";exit} |
39 | "Child process initialized" | 39 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
40 | } | 40 | } |
41 | sleep 1 | 41 | sleep 1 |
42 | 42 | ||
@@ -73,7 +73,7 @@ sleep 1 | |||
73 | send -- "firejail --whitelist=~/fjtest-dir/fjtest-dir/fjtest-file\r" | 73 | send -- "firejail --whitelist=~/fjtest-dir/fjtest-dir/fjtest-file\r" |
74 | expect { | 74 | expect { |
75 | timeout {puts "TESTING ERROR 10\n";exit} | 75 | timeout {puts "TESTING ERROR 10\n";exit} |
76 | "Child process initialized" | 76 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
77 | } | 77 | } |
78 | sleep 1 | 78 | sleep 1 |
79 | 79 | ||
@@ -98,7 +98,7 @@ sleep 1 | |||
98 | send -- "firejail --whitelist=~/fjtest-file-lnk --whitelist=~/fjtest-dir-lnk\r" | 98 | send -- "firejail --whitelist=~/fjtest-file-lnk --whitelist=~/fjtest-dir-lnk\r" |
99 | expect { | 99 | expect { |
100 | timeout {puts "TESTING ERROR 20\n";exit} | 100 | timeout {puts "TESTING ERROR 20\n";exit} |
101 | "Child process initialized" | 101 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
102 | } | 102 | } |
103 | sleep 1 | 103 | sleep 1 |
104 | 104 | ||