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/utils | |
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/utils')
-rwxr-xr-x | test/utils/caps-print.exp | 2 | ||||
-rwxr-xr-x | test/utils/cpu-print.exp | 4 | ||||
-rwxr-xr-x | test/utils/dns-print.exp | 2 | ||||
-rwxr-xr-x | test/utils/firemon-caps.exp | 14 | ||||
-rwxr-xr-x | test/utils/firemon-cgroup.exp | 4 | ||||
-rwxr-xr-x | test/utils/firemon-cpu.exp | 4 | ||||
-rwxr-xr-x | test/utils/firemon-name.exp | 2 | ||||
-rwxr-xr-x | test/utils/firemon-seccomp.exp | 4 | ||||
-rwxr-xr-x | test/utils/fs-print.exp | 2 | ||||
-rwxr-xr-x | test/utils/join-profile.exp | 10 | ||||
-rwxr-xr-x | test/utils/join.exp | 16 | ||||
-rwxr-xr-x | test/utils/join2.exp | 10 | ||||
-rwxr-xr-x | test/utils/join3.exp | 10 | ||||
-rwxr-xr-x | test/utils/join4.exp | 10 | ||||
-rwxr-xr-x | test/utils/join5.exp | 16 | ||||
-rwxr-xr-x | test/utils/list.exp | 6 | ||||
-rwxr-xr-x | test/utils/ls.exp | 2 | ||||
-rwxr-xr-x | test/utils/name.exp | 24 | ||||
-rwxr-xr-x | test/utils/profile_print.exp | 2 | ||||
-rwxr-xr-x | test/utils/protocol-print.exp | 2 | ||||
-rwxr-xr-x | test/utils/seccomp-print.exp | 2 | ||||
-rwxr-xr-x | test/utils/shutdown.exp | 2 | ||||
-rwxr-xr-x | test/utils/shutdown2.exp | 2 | ||||
-rwxr-xr-x | test/utils/shutdown3.exp | 2 | ||||
-rwxr-xr-x | test/utils/shutdown4.exp | 2 | ||||
-rwxr-xr-x | test/utils/top.exp | 4 | ||||
-rwxr-xr-x | test/utils/trace.exp | 14 | ||||
-rwxr-xr-x | test/utils/tree.exp | 6 |
28 files changed, 102 insertions, 78 deletions
diff --git a/test/utils/caps-print.exp b/test/utils/caps-print.exp index 76aad24f5..b6ccd05d4 100755 --- a/test/utils/caps-print.exp +++ b/test/utils/caps-print.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test\r" | 10 | send -- "firejail --name=test\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 2 | 15 | sleep 2 |
16 | 16 | ||
diff --git a/test/utils/cpu-print.exp b/test/utils/cpu-print.exp index de081e82b..3e4d63f2a 100755 --- a/test/utils/cpu-print.exp +++ b/test/utils/cpu-print.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test --cpu=0\r" | 10 | send -- "firejail --name=test --cpu=0\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 | send -- "cat /proc/self/status | grep Cpus\r" | 16 | send -- "cat /proc/self/status | grep Cpus\r" |
@@ -30,7 +30,7 @@ sleep 1 | |||
30 | send -- "firejail --name=test --cpu=1\r" | 30 | send -- "firejail --name=test --cpu=1\r" |
31 | expect { | 31 | expect { |
32 | timeout {puts "TESTING ERROR 3\n";exit} | 32 | timeout {puts "TESTING ERROR 3\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 | ||
diff --git a/test/utils/dns-print.exp b/test/utils/dns-print.exp index 034f2a6b9..c0cf2ff0f 100755 --- a/test/utils/dns-print.exp +++ b/test/utils/dns-print.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test --dns=1.2.3.4 --dns=::2\r" | 10 | send -- "firejail --name=test --dns=1.2.3.4 --dns=::2\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 2 | 15 | sleep 2 |
16 | 16 | ||
diff --git a/test/utils/firemon-caps.exp b/test/utils/firemon-caps.exp index dc229a85d..02b317341 100755 --- a/test/utils/firemon-caps.exp +++ b/test/utils/firemon-caps.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=bingo1 --noprofile --caps\r" | 10 | send -- "firejail --name=bingo1 --noprofile --caps\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 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --name=bingo2 --noprofile\r" | 18 | send -- "firejail --name=bingo2 --noprofile\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
@@ -26,7 +26,7 @@ spawn $env(SHELL) | |||
26 | send -- "firejail --name=bingo3 --noprofile --caps.drop=all\r" | 26 | send -- "firejail --name=bingo3 --noprofile --caps.drop=all\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 | ||
@@ -34,7 +34,7 @@ spawn $env(SHELL) | |||
34 | send -- "firejail --noprofile --name=bingo4 --caps.drop=chown,kill\r" | 34 | send -- "firejail --noprofile --name=bingo4 --caps.drop=chown,kill\r" |
35 | expect { | 35 | expect { |
36 | timeout {puts "TESTING ERROR 3\n";exit} | 36 | timeout {puts "TESTING ERROR 3\n";exit} |
37 | "Child process initialized" | 37 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
38 | } | 38 | } |
39 | sleep 1 | 39 | sleep 1 |
40 | 40 | ||
@@ -42,7 +42,7 @@ spawn $env(SHELL) | |||
42 | send -- "firejail --noprofile --name=bingo5 --caps.keep=chown,kill\r" | 42 | send -- "firejail --noprofile --name=bingo5 --caps.keep=chown,kill\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 | ||
@@ -50,7 +50,7 @@ spawn $env(SHELL) | |||
50 | send -- "firejail --name=bingo6 --profile=caps1.profile\r" | 50 | send -- "firejail --name=bingo6 --profile=caps1.profile\r" |
51 | expect { | 51 | expect { |
52 | timeout {puts "TESTING ERROR 5\n";exit} | 52 | timeout {puts "TESTING ERROR 5\n";exit} |
53 | "Child process initialized" | 53 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
54 | } | 54 | } |
55 | sleep 1 | 55 | sleep 1 |
56 | 56 | ||
@@ -58,7 +58,7 @@ spawn $env(SHELL) | |||
58 | send -- "firejail --name=bingo7 --profile=caps2.profile\r" | 58 | send -- "firejail --name=bingo7 --profile=caps2.profile\r" |
59 | expect { | 59 | expect { |
60 | timeout {puts "TESTING ERROR 0\n";exit} | 60 | timeout {puts "TESTING ERROR 0\n";exit} |
61 | "Child process initialized" | 61 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
62 | } | 62 | } |
63 | sleep 1 | 63 | sleep 1 |
64 | 64 | ||
diff --git a/test/utils/firemon-cgroup.exp b/test/utils/firemon-cgroup.exp index 1e4c4a398..2dbc04a50 100755 --- a/test/utils/firemon-cgroup.exp +++ b/test/utils/firemon-cgroup.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test1\r" | 10 | send -- "firejail --name=test1\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 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --name=test2\r" | 18 | send -- "firejail --name=test2\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/utils/firemon-cpu.exp b/test/utils/firemon-cpu.exp index cb9cff188..db5069ede 100755 --- a/test/utils/firemon-cpu.exp +++ b/test/utils/firemon-cpu.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test1\r" | 10 | send -- "firejail --name=test1\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 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --name=test2\r" | 18 | send -- "firejail --name=test2\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/utils/firemon-name.exp b/test/utils/firemon-name.exp index e28a45cfb..f8161cc81 100755 --- a/test/utils/firemon-name.exp +++ b/test/utils/firemon-name.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test\r" | 10 | send -- "firejail --name=test\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/utils/firemon-seccomp.exp b/test/utils/firemon-seccomp.exp index bbc38f27a..7eb6f9168 100755 --- a/test/utils/firemon-seccomp.exp +++ b/test/utils/firemon-seccomp.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --noprofile --name=bingo1 --seccomp\r" | 10 | send -- "firejail --noprofile --name=bingo1 --seccomp\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 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --noprofile --name=bingo2\r" | 18 | send -- "firejail --noprofile --name=bingo2\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 0.1\n";exit} | 20 | timeout {puts "TESTING ERROR 0.1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/utils/fs-print.exp b/test/utils/fs-print.exp index 09f84ba49..536d59dbd 100755 --- a/test/utils/fs-print.exp +++ b/test/utils/fs-print.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test\r" | 10 | send -- "firejail --name=test\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 2 | 15 | sleep 2 |
16 | 16 | ||
diff --git a/test/utils/join-profile.exp b/test/utils/join-profile.exp index 0f51ca0f7..565010b82 100755 --- a/test/utils/join-profile.exp +++ b/test/utils/join-profile.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --profile=name.profile\r" | 11 | send -- "firejail --profile=name.profile\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 2 | 16 | sleep 2 |
17 | 17 | ||
@@ -21,14 +21,18 @@ expect { | |||
21 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
22 | "Switching to pid" | 22 | "Switching to pid" |
23 | } | 23 | } |
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
27 | } | ||
24 | sleep 1 | 28 | sleep 1 |
25 | send -- "ps aux\r" | 29 | send -- "ps aux\r" |
26 | expect { | 30 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 31 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "/bin/bash" | 32 | "/bin/bash" |
29 | } | 33 | } |
30 | expect { | 34 | expect { |
31 | timeout {puts "TESTING ERROR 3\n";exit} | 35 | timeout {puts "TESTING ERROR 4\n";exit} |
32 | "/bin/bash" | 36 | "/bin/bash" |
33 | } | 37 | } |
34 | 38 | ||
diff --git a/test/utils/join.exp b/test/utils/join.exp index 9d3dccd92..82decce51 100755 --- a/test/utils/join.exp +++ b/test/utils/join.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --name=jointesting --cpu=0 --nice=2\r" | 11 | send -- "firejail --name=jointesting --cpu=0 --nice=2\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 2 | 16 | sleep 2 |
17 | 17 | ||
@@ -26,17 +26,21 @@ after 100 | |||
26 | 26 | ||
27 | send -- "firejail --join=jointesting\r" | 27 | send -- "firejail --join=jointesting\r" |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 1\n";exit} | 29 | timeout {puts "TESTING ERROR 2\n";exit} |
30 | "Switching to pid" | 30 | "Switching to pid" |
31 | } | 31 | } |
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 3\n";exit} | ||
34 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
35 | } | ||
32 | sleep 1 | 36 | sleep 1 |
33 | send -- "ps aux\r" | 37 | send -- "ps aux\r" |
34 | expect { | 38 | expect { |
35 | timeout {puts "TESTING ERROR 2\n";exit} | 39 | timeout {puts "TESTING ERROR 4\n";exit} |
36 | "/bin/bash" | 40 | "/bin/bash" |
37 | } | 41 | } |
38 | expect { | 42 | expect { |
39 | timeout {puts "TESTING ERROR 3\n";exit} | 43 | timeout {puts "TESTING ERROR 5\n";exit} |
40 | "/bin/bash" | 44 | "/bin/bash" |
41 | } | 45 | } |
42 | 46 | ||
@@ -44,13 +48,13 @@ send -- "exit\r" | |||
44 | sleep 1 | 48 | sleep 1 |
45 | send -- "firejail --join-network=jointesting\r" | 49 | send -- "firejail --join-network=jointesting\r" |
46 | expect { | 50 | expect { |
47 | timeout {puts "TESTING ERROR 4\n";exit} | 51 | timeout {puts "TESTING ERROR 6\n";exit} |
48 | "is only available to root user" | 52 | "is only available to root user" |
49 | } | 53 | } |
50 | after 100 | 54 | after 100 |
51 | send -- "firejail --join-filesystem=jointesting\r" | 55 | send -- "firejail --join-filesystem=jointesting\r" |
52 | expect { | 56 | expect { |
53 | timeout {puts "TESTING ERROR 5\n";exit} | 57 | timeout {puts "TESTING ERROR 7\n";exit} |
54 | "is only available to root user" | 58 | "is only available to root user" |
55 | } | 59 | } |
56 | 60 | ||
diff --git a/test/utils/join2.exp b/test/utils/join2.exp index d917d42a3..5f5a6bfe0 100755 --- a/test/utils/join2.exp +++ b/test/utils/join2.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --name=\"join testing\"\r" | 11 | send -- "firejail --name=\"join testing\"\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 2 | 16 | sleep 2 |
17 | 17 | ||
@@ -21,14 +21,18 @@ expect { | |||
21 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
22 | "Switching to pid" | 22 | "Switching to pid" |
23 | } | 23 | } |
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
27 | } | ||
24 | sleep 1 | 28 | sleep 1 |
25 | send -- "ps aux\r" | 29 | send -- "ps aux\r" |
26 | expect { | 30 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 31 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "/bin/bash" | 32 | "/bin/bash" |
29 | } | 33 | } |
30 | expect { | 34 | expect { |
31 | timeout {puts "TESTING ERROR 3\n";exit} | 35 | timeout {puts "TESTING ERROR 4\n";exit} |
32 | "/bin/bash" | 36 | "/bin/bash" |
33 | } | 37 | } |
34 | 38 | ||
diff --git a/test/utils/join3.exp b/test/utils/join3.exp index 5ace21260..c771b924b 100755 --- a/test/utils/join3.exp +++ b/test/utils/join3.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --name=join\\ testing\r" | 11 | send -- "firejail --name=join\\ testing\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 2 | 16 | sleep 2 |
17 | 17 | ||
@@ -21,14 +21,18 @@ expect { | |||
21 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
22 | "Switching to pid" | 22 | "Switching to pid" |
23 | } | 23 | } |
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
27 | } | ||
24 | sleep 1 | 28 | sleep 1 |
25 | send -- "ps aux\r" | 29 | send -- "ps aux\r" |
26 | expect { | 30 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 31 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "/bin/bash" | 32 | "/bin/bash" |
29 | } | 33 | } |
30 | expect { | 34 | expect { |
31 | timeout {puts "TESTING ERROR 3\n";exit} | 35 | timeout {puts "TESTING ERROR 4\n";exit} |
32 | "/bin/bash" | 36 | "/bin/bash" |
33 | } | 37 | } |
34 | 38 | ||
diff --git a/test/utils/join4.exp b/test/utils/join4.exp index 23104dc9c..cddf7ad18 100755 --- a/test/utils/join4.exp +++ b/test/utils/join4.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --name=123test\r" | 11 | send -- "firejail --name=123test\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 2 | 16 | sleep 2 |
17 | 17 | ||
@@ -21,14 +21,18 @@ expect { | |||
21 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
22 | "Switching to pid" | 22 | "Switching to pid" |
23 | } | 23 | } |
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
27 | } | ||
24 | sleep 1 | 28 | sleep 1 |
25 | send -- "ps aux\r" | 29 | send -- "ps aux\r" |
26 | expect { | 30 | expect { |
27 | timeout {puts "TESTING ERROR 2\n";exit} | 31 | timeout {puts "TESTING ERROR 3\n";exit} |
28 | "/bin/bash" | 32 | "/bin/bash" |
29 | } | 33 | } |
30 | expect { | 34 | expect { |
31 | timeout {puts "TESTING ERROR 3\n";exit} | 35 | timeout {puts "TESTING ERROR 4\n";exit} |
32 | "/bin/bash" | 36 | "/bin/bash" |
33 | } | 37 | } |
34 | 38 | ||
diff --git a/test/utils/join5.exp b/test/utils/join5.exp index 44167cffb..c0990ebf1 100755 --- a/test/utils/join5.exp +++ b/test/utils/join5.exp | |||
@@ -9,8 +9,8 @@ match_max 100000 | |||
9 | 9 | ||
10 | send -- "firejail --name=test123 --profile=join5.profile\r" | 10 | send -- "firejail --name=test123 --profile=join5.profile\r" |
11 | expect { | 11 | expect { |
12 | timeout {puts "TESTING ERROR 5\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 | spawn $env(SHELL) | 16 | spawn $env(SHELL) |
@@ -19,14 +19,18 @@ expect { | |||
19 | timeout {puts "TESTING ERROR 1\n";exit} | 19 | timeout {puts "TESTING ERROR 1\n";exit} |
20 | "Switching to pid" | 20 | "Switching to pid" |
21 | } | 21 | } |
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 2\n";exit} | ||
24 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
25 | } | ||
22 | sleep 1 | 26 | sleep 1 |
23 | send -- "ps aux\r" | 27 | send -- "ps aux\r" |
24 | expect { | 28 | expect { |
25 | timeout {puts "TESTING ERROR 2\n";exit} | 29 | timeout {puts "TESTING ERROR 3\n";exit} |
26 | "/bin/bash" | 30 | "/bin/bash" |
27 | } | 31 | } |
28 | expect { | 32 | expect { |
29 | timeout {puts "TESTING ERROR 3\n";exit} | 33 | timeout {puts "TESTING ERROR 4\n";exit} |
30 | "/bin/bash" | 34 | "/bin/bash" |
31 | } | 35 | } |
32 | 36 | ||
@@ -35,11 +39,11 @@ after 100 | |||
35 | 39 | ||
36 | send -- "firejail --protocol.print=test123\r" | 40 | send -- "firejail --protocol.print=test123\r" |
37 | expect { | 41 | expect { |
38 | timeout {puts "TESTING ERROR 4\n";exit} | 42 | timeout {puts "TESTING ERROR 5\n";exit} |
39 | "Switching to pid" | 43 | "Switching to pid" |
40 | } | 44 | } |
41 | expect { | 45 | expect { |
42 | timeout {puts "TESTING ERROR 5\n";exit} | 46 | timeout {puts "TESTING ERROR 6\n";exit} |
43 | "unix" | 47 | "unix" |
44 | } | 48 | } |
45 | 49 | ||
diff --git a/test/utils/list.exp b/test/utils/list.exp index 48711fe4b..30344e22a 100755 --- a/test/utils/list.exp +++ b/test/utils/list.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 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 | 16 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail\r" | 18 | send -- "firejail\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | after 100 | 23 | after 100 |
24 | 24 | ||
@@ -26,7 +26,7 @@ spawn $env(SHELL) | |||
26 | send -- "firejail\r" | 26 | send -- "firejail\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 | ||
diff --git a/test/utils/ls.exp b/test/utils/ls.exp index 9dac20628..6b6c67ede 100755 --- a/test/utils/ls.exp +++ b/test/utils/ls.exp | |||
@@ -14,7 +14,7 @@ sleep 1 | |||
14 | send -- "firejail --private --name=test\r" | 14 | send -- "firejail --private --name=test\r" |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 0\n";exit} | 16 | timeout {puts "TESTING ERROR 0\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 1 | 19 | sleep 1 |
20 | send -- "echo my_testing > ~/lstesting\r" | 20 | send -- "echo my_testing > ~/lstesting\r" |
diff --git a/test/utils/name.exp b/test/utils/name.exp index ade119183..cd4465d41 100755 --- a/test/utils/name.exp +++ b/test/utils/name.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --name=ftest\r" | 11 | send -- "firejail --name=ftest\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 | 17 | ||
@@ -19,7 +19,7 @@ spawn $env(SHELL) | |||
19 | send -- "firejail --name=ftest\r" | 19 | send -- "firejail --name=ftest\r" |
20 | expect { | 20 | expect { |
21 | timeout {puts "TESTING ERROR 1\n";exit} | 21 | timeout {puts "TESTING ERROR 1\n";exit} |
22 | "Child process initialized" | 22 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
23 | } | 23 | } |
24 | after 100 | 24 | after 100 |
25 | 25 | ||
@@ -27,7 +27,7 @@ spawn $env(SHELL) | |||
27 | send -- "firejail --name=ftest\r" | 27 | send -- "firejail --name=ftest\r" |
28 | expect { | 28 | expect { |
29 | timeout {puts "TESTING ERROR 2\n";exit} | 29 | timeout {puts "TESTING ERROR 2\n";exit} |
30 | "Child process initialized" | 30 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
31 | } | 31 | } |
32 | after 100 | 32 | after 100 |
33 | 33 | ||
@@ -35,7 +35,7 @@ spawn $env(SHELL) | |||
35 | send -- "firejail --name=ftest\r" | 35 | send -- "firejail --name=ftest\r" |
36 | expect { | 36 | expect { |
37 | timeout {puts "TESTING ERROR 3\n";exit} | 37 | timeout {puts "TESTING ERROR 3\n";exit} |
38 | "Child process initialized" | 38 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
39 | } | 39 | } |
40 | after 100 | 40 | after 100 |
41 | 41 | ||
@@ -43,7 +43,7 @@ spawn $env(SHELL) | |||
43 | send -- "firejail --name=ftest\r" | 43 | send -- "firejail --name=ftest\r" |
44 | expect { | 44 | expect { |
45 | timeout {puts "TESTING ERROR 4\n";exit} | 45 | timeout {puts "TESTING ERROR 4\n";exit} |
46 | "Child process initialized" | 46 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
47 | } | 47 | } |
48 | after 100 | 48 | after 100 |
49 | 49 | ||
@@ -51,7 +51,7 @@ spawn $env(SHELL) | |||
51 | send -- "firejail --name=ftest\r" | 51 | send -- "firejail --name=ftest\r" |
52 | expect { | 52 | expect { |
53 | timeout {puts "TESTING ERROR 5\n";exit} | 53 | timeout {puts "TESTING ERROR 5\n";exit} |
54 | "Child process initialized" | 54 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
55 | } | 55 | } |
56 | after 100 | 56 | after 100 |
57 | 57 | ||
@@ -59,7 +59,7 @@ spawn $env(SHELL) | |||
59 | send -- "firejail --name=ftest\r" | 59 | send -- "firejail --name=ftest\r" |
60 | expect { | 60 | expect { |
61 | timeout {puts "TESTING ERROR 6\n";exit} | 61 | timeout {puts "TESTING ERROR 6\n";exit} |
62 | "Child process initialized" | 62 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
63 | } | 63 | } |
64 | after 100 | 64 | after 100 |
65 | 65 | ||
@@ -67,7 +67,7 @@ spawn $env(SHELL) | |||
67 | send -- "firejail --name=ftest\r" | 67 | send -- "firejail --name=ftest\r" |
68 | expect { | 68 | expect { |
69 | timeout {puts "TESTING ERROR 7\n";exit} | 69 | timeout {puts "TESTING ERROR 7\n";exit} |
70 | "Child process initialized" | 70 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
71 | } | 71 | } |
72 | after 100 | 72 | after 100 |
73 | 73 | ||
@@ -75,7 +75,7 @@ spawn $env(SHELL) | |||
75 | send -- "firejail --name=ftest\r" | 75 | send -- "firejail --name=ftest\r" |
76 | expect { | 76 | expect { |
77 | timeout {puts "TESTING ERROR 8\n";exit} | 77 | timeout {puts "TESTING ERROR 8\n";exit} |
78 | "Child process initialized" | 78 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
79 | } | 79 | } |
80 | after 100 | 80 | after 100 |
81 | 81 | ||
@@ -83,7 +83,7 @@ spawn $env(SHELL) | |||
83 | send -- "firejail --name=ftest\r" | 83 | send -- "firejail --name=ftest\r" |
84 | expect { | 84 | expect { |
85 | timeout {puts "TESTING ERROR 9\n";exit} | 85 | timeout {puts "TESTING ERROR 9\n";exit} |
86 | "Child process initialized" | 86 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
87 | } | 87 | } |
88 | after 100 | 88 | after 100 |
89 | 89 | ||
@@ -91,7 +91,7 @@ spawn $env(SHELL) | |||
91 | send -- "firejail --name=ftest\r" | 91 | send -- "firejail --name=ftest\r" |
92 | expect { | 92 | expect { |
93 | timeout {puts "TESTING ERROR 10\n";exit} | 93 | timeout {puts "TESTING ERROR 10\n";exit} |
94 | "Child process initialized" | 94 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
95 | } | 95 | } |
96 | after 100 | 96 | after 100 |
97 | 97 | ||
@@ -99,7 +99,7 @@ spawn $env(SHELL) | |||
99 | send -- "firejail --name=ftest\r" | 99 | send -- "firejail --name=ftest\r" |
100 | expect { | 100 | expect { |
101 | timeout {puts "TESTING ERROR 11\n";exit} | 101 | timeout {puts "TESTING ERROR 11\n";exit} |
102 | "Child process initialized" | 102 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
103 | } | 103 | } |
104 | after 100 | 104 | after 100 |
105 | 105 | ||
diff --git a/test/utils/profile_print.exp b/test/utils/profile_print.exp index d64a4a2ad..9b2d65d84 100755 --- a/test/utils/profile_print.exp +++ b/test/utils/profile_print.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --name=ftest\r" | 11 | send -- "firejail --name=ftest\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 | 17 | ||
diff --git a/test/utils/protocol-print.exp b/test/utils/protocol-print.exp index 2e581a03a..ca74b7fc9 100755 --- a/test/utils/protocol-print.exp +++ b/test/utils/protocol-print.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test\r" | 10 | send -- "firejail --name=test\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 2 | 15 | sleep 2 |
16 | 16 | ||
diff --git a/test/utils/seccomp-print.exp b/test/utils/seccomp-print.exp index 51bbfb874..a9525ce2e 100755 --- a/test/utils/seccomp-print.exp +++ b/test/utils/seccomp-print.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test\r" | 10 | send -- "firejail --name=test\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 2 | 15 | sleep 2 |
16 | 16 | ||
diff --git a/test/utils/shutdown.exp b/test/utils/shutdown.exp index 13580cbdf..3950e901c 100755 --- a/test/utils/shutdown.exp +++ b/test/utils/shutdown.exp | |||
@@ -11,7 +11,7 @@ match_max 100000 | |||
11 | send -- "firejail --name=shutdowntesting\r" | 11 | send -- "firejail --name=shutdowntesting\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 2 | 16 | sleep 2 |
17 | 17 | ||
diff --git a/test/utils/shutdown2.exp b/test/utils/shutdown2.exp index 2ffe2d8ae..4dabf6c23 100755 --- a/test/utils/shutdown2.exp +++ b/test/utils/shutdown2.exp | |||
@@ -12,7 +12,7 @@ set firstspawn $spawn_id | |||
12 | send -- "firejail --name=shutdowntesting ./catchsignal.sh\r" | 12 | send -- "firejail --name=shutdowntesting ./catchsignal.sh\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 2 | 17 | sleep 2 |
18 | 18 | ||
diff --git a/test/utils/shutdown3.exp b/test/utils/shutdown3.exp index e96ded14d..8017d753d 100755 --- a/test/utils/shutdown3.exp +++ b/test/utils/shutdown3.exp | |||
@@ -12,7 +12,7 @@ set firstspawn $spawn_id | |||
12 | send -- "firejail --name=shutdowntesting ./catchsignal-master.sh\r" | 12 | send -- "firejail --name=shutdowntesting ./catchsignal-master.sh\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 2 | 17 | sleep 2 |
18 | 18 | ||
diff --git a/test/utils/shutdown4.exp b/test/utils/shutdown4.exp index a94cac64b..09db3f140 100755 --- a/test/utils/shutdown4.exp +++ b/test/utils/shutdown4.exp | |||
@@ -12,7 +12,7 @@ set firstspawn $spawn_id | |||
12 | send -- "firejail --name=shutdowntesting ./catchsignal2.sh\r" | 12 | send -- "firejail --name=shutdowntesting ./catchsignal2.sh\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 2 | 17 | sleep 2 |
18 | 18 | ||
diff --git a/test/utils/top.exp b/test/utils/top.exp index 515b4ffbf..402d7c2df 100755 --- a/test/utils/top.exp +++ b/test/utils/top.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test1\r" | 10 | send -- "firejail --name=test1\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 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail --name=test2\r" | 18 | send -- "firejail --name=test2\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | sleep 1 | 23 | sleep 1 |
24 | 24 | ||
diff --git a/test/utils/trace.exp b/test/utils/trace.exp index 890884248..f14001c88 100755 --- a/test/utils/trace.exp +++ b/test/utils/trace.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --trace mkdir ttt\r" | 10 | send -- "firejail --trace mkdir ttt\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 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
@@ -21,7 +21,7 @@ sleep 1 | |||
21 | send -- "firejail --trace rmdir ttt\r" | 21 | send -- "firejail --trace rmdir ttt\r" |
22 | expect { | 22 | expect { |
23 | timeout {puts "TESTING ERROR 2\n";exit} | 23 | timeout {puts "TESTING ERROR 2\n";exit} |
24 | "Child process initialized" | 24 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
25 | } | 25 | } |
26 | expect { | 26 | expect { |
27 | timeout {puts "TESTING ERROR 3\n";exit} | 27 | timeout {puts "TESTING ERROR 3\n";exit} |
@@ -32,7 +32,7 @@ sleep 1 | |||
32 | send -- "firejail --trace touch ttt\r" | 32 | send -- "firejail --trace touch ttt\r" |
33 | expect { | 33 | expect { |
34 | timeout {puts "TESTING ERROR 4\n";exit} | 34 | timeout {puts "TESTING ERROR 4\n";exit} |
35 | "Child process initialized" | 35 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
36 | } | 36 | } |
37 | expect { | 37 | expect { |
38 | timeout {puts "TESTING ERROR 5\n";exit} | 38 | timeout {puts "TESTING ERROR 5\n";exit} |
@@ -44,7 +44,7 @@ sleep 1 | |||
44 | send -- "firejail --trace rm ttt\r" | 44 | send -- "firejail --trace rm ttt\r" |
45 | expect { | 45 | expect { |
46 | timeout {puts "TESTING ERROR 6\n";exit} | 46 | timeout {puts "TESTING ERROR 6\n";exit} |
47 | "Child process initialized" | 47 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
48 | } | 48 | } |
49 | expect { | 49 | expect { |
50 | timeout {puts "TESTING ERROR 7\n";exit} | 50 | timeout {puts "TESTING ERROR 7\n";exit} |
@@ -55,7 +55,7 @@ sleep 1 | |||
55 | send -- "firejail --trace wget -q debian.org\r" | 55 | send -- "firejail --trace wget -q debian.org\r" |
56 | #expect { | 56 | #expect { |
57 | # timeout {puts "TESTING ERROR 8.1\n";exit} | 57 | # timeout {puts "TESTING ERROR 8.1\n";exit} |
58 | # "Child process initialized" | 58 | # -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
59 | #} | 59 | #} |
60 | #expect { | 60 | #expect { |
61 | # timeout {puts "TESTING ERROR 8.2\n";exit} | 61 | # timeout {puts "TESTING ERROR 8.2\n";exit} |
@@ -86,7 +86,7 @@ sleep 1 | |||
86 | send -- "firejail --trace rm index.html\r" | 86 | send -- "firejail --trace rm index.html\r" |
87 | expect { | 87 | expect { |
88 | timeout {puts "TESTING ERROR 9\n";exit} | 88 | timeout {puts "TESTING ERROR 9\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 10\n";exit} | 92 | timeout {puts "TESTING ERROR 10\n";exit} |
@@ -98,7 +98,7 @@ sleep 1 | |||
98 | send -- "firejail --trace\r" | 98 | send -- "firejail --trace\r" |
99 | expect { | 99 | expect { |
100 | timeout {puts "TESTING ERROR 11\n";exit} | 100 | timeout {puts "TESTING ERROR 11\n";exit} |
101 | "Child process initialized" | 101 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
102 | } | 102 | } |
103 | expect { | 103 | expect { |
104 | timeout {puts "TESTING ERROR 12\n";exit} | 104 | timeout {puts "TESTING ERROR 12\n";exit} |
diff --git a/test/utils/tree.exp b/test/utils/tree.exp index 9cdb09639..4b1f70bd2 100755 --- a/test/utils/tree.exp +++ b/test/utils/tree.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 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 | 16 | ||
@@ -18,7 +18,7 @@ spawn $env(SHELL) | |||
18 | send -- "firejail\r" | 18 | send -- "firejail\r" |
19 | expect { | 19 | expect { |
20 | timeout {puts "TESTING ERROR 1\n";exit} | 20 | timeout {puts "TESTING ERROR 1\n";exit} |
21 | "Child process initialized" | 21 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
22 | } | 22 | } |
23 | after 100 | 23 | after 100 |
24 | 24 | ||
@@ -26,7 +26,7 @@ spawn $env(SHELL) | |||
26 | send -- "firejail\r" | 26 | send -- "firejail\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 | ||