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/filters | |
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/filters')
-rwxr-xr-x | test/filters/apparmor.exp | 4 | ||||
-rwxr-xr-x | test/filters/caps-join.exp | 6 | ||||
-rwxr-xr-x | test/filters/caps-print.exp | 2 | ||||
-rwxr-xr-x | test/filters/caps.exp | 12 | ||||
-rwxr-xr-x | test/filters/memwrexe-32.exp | 6 | ||||
-rwxr-xr-x | test/filters/memwrexe.exp | 6 | ||||
-rwxr-xr-x | test/filters/noroot.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-chmod-profile.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-chmod.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-chown.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-debug-32.exp | 12 | ||||
-rwxr-xr-x | test/filters/seccomp-debug.exp | 14 | ||||
-rwxr-xr-x | test/filters/seccomp-empty.exp | 8 | ||||
-rwxr-xr-x | test/filters/seccomp-errno.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-ptrace.exp | 2 | ||||
-rwxr-xr-x | test/filters/seccomp-su.exp | 2 |
16 files changed, 42 insertions, 42 deletions
diff --git a/test/filters/apparmor.exp b/test/filters/apparmor.exp index c7e793ca3..13ce4dd06 100755 --- a/test/filters/apparmor.exp +++ b/test/filters/apparmor.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test1 --apparmor\r" | 10 | send -- "firejail --name=test1 --apparmor\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 --apparmor\r" | 18 | send -- "firejail --name=test2 --apparmor\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/filters/caps-join.exp b/test/filters/caps-join.exp index e9b5f59d0..921d6b695 100755 --- a/test/filters/caps-join.exp +++ b/test/filters/caps-join.exp | |||
@@ -20,7 +20,7 @@ set spawn_id $id1 | |||
20 | send -- "firejail --name=jointesting\r" | 20 | send -- "firejail --name=jointesting\r" |
21 | expect { | 21 | expect { |
22 | timeout {puts "TESTING ERROR 0\n";exit} | 22 | timeout {puts "TESTING ERROR 0\n";exit} |
23 | "Child process initialized" | 23 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
24 | } | 24 | } |
25 | sleep 1 | 25 | sleep 1 |
26 | 26 | ||
@@ -44,7 +44,7 @@ set spawn_id $id1 | |||
44 | send -- "firejail --name=jointesting --noprofile\r" | 44 | send -- "firejail --name=jointesting --noprofile\r" |
45 | expect { | 45 | expect { |
46 | timeout {puts "TESTING ERROR 10\n";exit} | 46 | timeout {puts "TESTING ERROR 10\n";exit} |
47 | "Child process initialized" | 47 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
48 | } | 48 | } |
49 | sleep 1 | 49 | sleep 1 |
50 | 50 | ||
@@ -76,7 +76,7 @@ set spawn_id $id1 | |||
76 | send -- "firejail --name=jointesting --noprofile --caps.keep=chown,fowner\r" | 76 | send -- "firejail --name=jointesting --noprofile --caps.keep=chown,fowner\r" |
77 | expect { | 77 | expect { |
78 | timeout {puts "TESTING ERROR20\n";exit} | 78 | timeout {puts "TESTING ERROR20\n";exit} |
79 | "Child process initialized" | 79 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
80 | } | 80 | } |
81 | sleep 1 | 81 | sleep 1 |
82 | 82 | ||
diff --git a/test/filters/caps-print.exp b/test/filters/caps-print.exp index 8c51bb796..f4f2fc7ca 100755 --- a/test/filters/caps-print.exp +++ b/test/filters/caps-print.exp | |||
@@ -42,7 +42,7 @@ expect { | |||
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 8\n";exit} | 44 | timeout {puts "TESTING ERROR 8\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 | ||
diff --git a/test/filters/caps.exp b/test/filters/caps.exp index c29794ea3..29437beea 100755 --- a/test/filters/caps.exp +++ b/test/filters/caps.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --caps.keep=chown,fowner --noprofile\r" | 10 | send -- "firejail --caps.keep=chown,fowner --noprofile\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 | ||
@@ -29,7 +29,7 @@ sleep 1 | |||
29 | send -- "firejail --caps.drop=all --noprofile\r" | 29 | send -- "firejail --caps.drop=all --noprofile\r" |
30 | expect { | 30 | expect { |
31 | timeout {puts "TESTING ERROR 4\n";exit} | 31 | timeout {puts "TESTING ERROR 4\n";exit} |
32 | "Child process initialized" | 32 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
33 | } | 33 | } |
34 | after 100 | 34 | after 100 |
35 | 35 | ||
@@ -48,7 +48,7 @@ sleep 1 | |||
48 | send -- "firejail --caps.drop=chown,dac_override,dac_read_search,fowner --noprofile\r" | 48 | send -- "firejail --caps.drop=chown,dac_override,dac_read_search,fowner --noprofile\r" |
49 | expect { | 49 | expect { |
50 | timeout {puts "TESTING ERROR 7\n";exit} | 50 | timeout {puts "TESTING ERROR 7\n";exit} |
51 | "Child process initialized" | 51 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
52 | } | 52 | } |
53 | after 100 | 53 | after 100 |
54 | 54 | ||
@@ -81,7 +81,7 @@ expect { | |||
81 | expect { | 81 | expect { |
82 | timeout {puts "TESTING ERROR 13\n";exit} | 82 | timeout {puts "TESTING ERROR 13\n";exit} |
83 | "Drop CAP_" {puts "TESTING ERROR 14\n";exit} | 83 | "Drop CAP_" {puts "TESTING ERROR 14\n";exit} |
84 | "Child process initialized" | 84 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
85 | } | 85 | } |
86 | after 100 | 86 | after 100 |
87 | send -- "exit\r" | 87 | send -- "exit\r" |
@@ -93,7 +93,7 @@ sleep 1 | |||
93 | #send -- "firejail --profile=caps2.profile\r" | 93 | #send -- "firejail --profile=caps2.profile\r" |
94 | #expect { | 94 | #expect { |
95 | # timeout {puts "TESTING ERROR 15\n";exit} | 95 | # timeout {puts "TESTING ERROR 15\n";exit} |
96 | # "Child process initialized" | 96 | # -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
97 | #} | 97 | #} |
98 | #after 100 | 98 | #after 100 |
99 | # | 99 | # |
@@ -113,7 +113,7 @@ sleep 1 | |||
113 | send -- "firejail --profile=caps3.profile\r" | 113 | send -- "firejail --profile=caps3.profile\r" |
114 | expect { | 114 | expect { |
115 | timeout {puts "TESTING ERROR 18\n";exit} | 115 | timeout {puts "TESTING ERROR 18\n";exit} |
116 | "Child process initialized" | 116 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
117 | } | 117 | } |
118 | after 100 | 118 | after 100 |
119 | 119 | ||
diff --git a/test/filters/memwrexe-32.exp b/test/filters/memwrexe-32.exp index f7b59f43f..211052514 100755 --- a/test/filters/memwrexe-32.exp +++ b/test/filters/memwrexe-32.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 mmap\r" | 10 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 mmap\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} |
@@ -22,7 +22,7 @@ after 100 | |||
22 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 mprotect\r" | 22 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 mprotect\r" |
23 | expect { | 23 | expect { |
24 | timeout {puts "TESTING ERROR 10\n";exit} | 24 | timeout {puts "TESTING ERROR 10\n";exit} |
25 | "Child process initialized" | 25 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
26 | } | 26 | } |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 11\n";exit} | 28 | timeout {puts "TESTING ERROR 11\n";exit} |
@@ -34,7 +34,7 @@ after 100 | |||
34 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 memfd_create\r" | 34 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 memfd_create\r" |
35 | expect { | 35 | expect { |
36 | timeout {puts "TESTING ERROR 20\n";exit} | 36 | timeout {puts "TESTING ERROR 20\n";exit} |
37 | "Child process initialized" | 37 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
38 | } | 38 | } |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 21\n";exit} | 40 | timeout {puts "TESTING ERROR 21\n";exit} |
diff --git a/test/filters/memwrexe.exp b/test/filters/memwrexe.exp index 9d08509e9..950acbf50 100755 --- a/test/filters/memwrexe.exp +++ b/test/filters/memwrexe.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --memory-deny-write-execute ./memwrexe mmap\r" | 10 | send -- "firejail --memory-deny-write-execute ./memwrexe mmap\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} |
@@ -22,7 +22,7 @@ after 100 | |||
22 | send -- "firejail --memory-deny-write-execute ./memwrexe mprotect\r" | 22 | send -- "firejail --memory-deny-write-execute ./memwrexe mprotect\r" |
23 | expect { | 23 | expect { |
24 | timeout {puts "TESTING ERROR 10\n";exit} | 24 | timeout {puts "TESTING ERROR 10\n";exit} |
25 | "Child process initialized" | 25 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
26 | } | 26 | } |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 11\n";exit} | 28 | timeout {puts "TESTING ERROR 11\n";exit} |
@@ -34,7 +34,7 @@ after 100 | |||
34 | send -- "firejail --memory-deny-write-execute ./memwrexe memfd_create\r" | 34 | send -- "firejail --memory-deny-write-execute ./memwrexe memfd_create\r" |
35 | expect { | 35 | expect { |
36 | timeout {puts "TESTING ERROR 20\n";exit} | 36 | timeout {puts "TESTING ERROR 20\n";exit} |
37 | "Child process initialized" | 37 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
38 | } | 38 | } |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 21\n";exit} | 40 | timeout {puts "TESTING ERROR 21\n";exit} |
diff --git a/test/filters/noroot.exp b/test/filters/noroot.exp index 504b17239..66e1e4e27 100755 --- a/test/filters/noroot.exp +++ b/test/filters/noroot.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --name=test --noroot --noprofile\r" | 10 | send -- "firejail --name=test --noroot --noprofile\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/filters/seccomp-chmod-profile.exp b/test/filters/seccomp-chmod-profile.exp index c754b48fa..ac16015cd 100755 --- a/test/filters/seccomp-chmod-profile.exp +++ b/test/filters/seccomp-chmod-profile.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --profile=seccomp.profile --private\r" | 10 | send -- "firejail --profile=seccomp.profile --private\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/filters/seccomp-chmod.exp b/test/filters/seccomp-chmod.exp index 39baa5533..913ea18a7 100755 --- a/test/filters/seccomp-chmod.exp +++ b/test/filters/seccomp-chmod.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --seccomp=chmod,fchmod,fchmodat --private\r" | 10 | send -- "firejail --seccomp=chmod,fchmod,fchmodat --private\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/filters/seccomp-chown.exp b/test/filters/seccomp-chown.exp index 553f164b1..be6c13e2d 100755 --- a/test/filters/seccomp-chown.exp +++ b/test/filters/seccomp-chown.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --seccomp=chown,fchown,fchownat,lchown --private\r" | 10 | send -- "firejail --seccomp=chown,fchown,fchownat,lchown --private\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/filters/seccomp-debug-32.exp b/test/filters/seccomp-debug-32.exp index a2f99c1ca..71d653c1f 100755 --- a/test/filters/seccomp-debug-32.exp +++ b/test/filters/seccomp-debug-32.exp | |||
@@ -21,7 +21,7 @@ expect { | |||
21 | } | 21 | } |
22 | expect { | 22 | expect { |
23 | timeout {puts "TESTING ERROR 3\n";exit} | 23 | timeout {puts "TESTING ERROR 3\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 4\n";exit} | 27 | timeout {puts "TESTING ERROR 4\n";exit} |
@@ -36,7 +36,7 @@ expect { | |||
36 | timeout {puts "TESTING ERROR 10\n";exit} | 36 | timeout {puts "TESTING ERROR 10\n";exit} |
37 | "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} | 37 | "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} |
38 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 12\n";exit} | 38 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 12\n";exit} |
39 | "Child process initialized" | 39 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
40 | } | 40 | } |
41 | expect { | 41 | expect { |
42 | timeout {puts "TESTING ERROR 16\n";exit} | 42 | timeout {puts "TESTING ERROR 16\n";exit} |
@@ -48,7 +48,7 @@ after 100 | |||
48 | send -- "firejail --debug --ignore=protocol sleep 1; echo done\r" | 48 | send -- "firejail --debug --ignore=protocol sleep 1; echo done\r" |
49 | expect { | 49 | expect { |
50 | timeout {puts "TESTING ERROR 17\n";exit} | 50 | timeout {puts "TESTING ERROR 17\n";exit} |
51 | "Child process initialized" | 51 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
52 | } | 52 | } |
53 | expect { | 53 | expect { |
54 | timeout {puts "TESTING ERROR 19\n";exit} | 54 | timeout {puts "TESTING ERROR 19\n";exit} |
@@ -65,7 +65,7 @@ after 100 | |||
65 | send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" | 65 | send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" |
66 | expect { | 66 | expect { |
67 | timeout {puts "TESTING ERROR 24\n";exit} | 67 | timeout {puts "TESTING ERROR 24\n";exit} |
68 | "Child process initialized" | 68 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
69 | } | 69 | } |
70 | expect { | 70 | expect { |
71 | timeout {puts "TESTING ERROR 25\n";exit} | 71 | timeout {puts "TESTING ERROR 25\n";exit} |
@@ -82,7 +82,7 @@ send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r" | |||
82 | expect { | 82 | expect { |
83 | timeout {puts "TESTING ERROR 27\n";exit} | 83 | timeout {puts "TESTING ERROR 27\n";exit} |
84 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 28\n";exit} | 84 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 28\n";exit} |
85 | "Child process initialized" | 85 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
86 | } | 86 | } |
87 | expect { | 87 | expect { |
88 | timeout {puts "TESTING ERROR 29\n";exit} | 88 | timeout {puts "TESTING ERROR 29\n";exit} |
@@ -105,7 +105,7 @@ send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\ | |||
105 | expect { | 105 | expect { |
106 | timeout {puts "TESTING ERROR 33\n";exit} | 106 | timeout {puts "TESTING ERROR 33\n";exit} |
107 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 34\n";exit} | 107 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 34\n";exit} |
108 | "Child process initialized" | 108 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
109 | } | 109 | } |
110 | expect { | 110 | expect { |
111 | timeout {puts "TESTING ERROR 35\n";exit} | 111 | timeout {puts "TESTING ERROR 35\n";exit} |
diff --git a/test/filters/seccomp-debug.exp b/test/filters/seccomp-debug.exp index d2413697d..b4a9e158d 100755 --- a/test/filters/seccomp-debug.exp +++ b/test/filters/seccomp-debug.exp | |||
@@ -21,7 +21,7 @@ expect { | |||
21 | } | 21 | } |
22 | expect { | 22 | expect { |
23 | timeout {puts "TESTING ERROR 3\n";exit} | 23 | timeout {puts "TESTING ERROR 3\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 4\n";exit} | 27 | timeout {puts "TESTING ERROR 4\n";exit} |
@@ -34,7 +34,7 @@ after 100 | |||
34 | send -- "firejail --debug sleep 1; echo done\r" | 34 | send -- "firejail --debug sleep 1; echo done\r" |
35 | expect { | 35 | expect { |
36 | timeout {puts "TESTING ERROR 5\n";exit} | 36 | timeout {puts "TESTING ERROR 5\n";exit} |
37 | "Child process initialized" | 37 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
38 | } | 38 | } |
39 | expect { | 39 | expect { |
40 | timeout {puts "TESTING ERROR 6\n";exit} | 40 | timeout {puts "TESTING ERROR 6\n";exit} |
@@ -60,7 +60,7 @@ expect { | |||
60 | timeout {puts "TESTING ERROR 10\n";exit} | 60 | timeout {puts "TESTING ERROR 10\n";exit} |
61 | "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} | 61 | "Installing /run/firejail/mnt/seccomp/seccomp seccomp filter" {puts "TESTING ERROR 11\n";exit} |
62 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 12\n";exit} | 62 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 12\n";exit} |
63 | "Child process initialized" | 63 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
64 | } | 64 | } |
65 | expect { | 65 | expect { |
66 | timeout {puts "TESTING ERROR 13\n";exit} | 66 | timeout {puts "TESTING ERROR 13\n";exit} |
@@ -79,7 +79,7 @@ send -- "firejail --debug --ignore=protocol sleep 1; echo done\r" | |||
79 | expect { | 79 | expect { |
80 | timeout {puts "TESTING ERROR 17\n";exit} | 80 | timeout {puts "TESTING ERROR 17\n";exit} |
81 | "Installing /run/firejail/mnt/seccomp/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit} | 81 | "Installing /run/firejail/mnt/seccomp/seccomp.protocol seccomp filter" {puts "TESTING ERROR 18\n";exit} |
82 | "Child process initialized" | 82 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
83 | } | 83 | } |
84 | expect { | 84 | expect { |
85 | timeout {puts "TESTING ERROR 19\n";exit} | 85 | timeout {puts "TESTING ERROR 19\n";exit} |
@@ -101,7 +101,7 @@ after 100 | |||
101 | send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" | 101 | send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" |
102 | expect { | 102 | expect { |
103 | timeout {puts "TESTING ERROR 24\n";exit} | 103 | timeout {puts "TESTING ERROR 24\n";exit} |
104 | "Child process initialized" | 104 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
105 | } | 105 | } |
106 | expect { | 106 | expect { |
107 | timeout {puts "TESTING ERROR 25\n";exit} | 107 | timeout {puts "TESTING ERROR 25\n";exit} |
@@ -118,7 +118,7 @@ send -- "firejail --debug --seccomp.block-secondary sleep 1; echo done\r" | |||
118 | expect { | 118 | expect { |
119 | timeout {puts "TESTING ERROR 27\n";exit} | 119 | timeout {puts "TESTING ERROR 27\n";exit} |
120 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 28\n";exit} | 120 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 28\n";exit} |
121 | "Child process initialized" | 121 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
122 | } | 122 | } |
123 | expect { | 123 | expect { |
124 | timeout {puts "TESTING ERROR 29\n";exit} | 124 | timeout {puts "TESTING ERROR 29\n";exit} |
@@ -141,7 +141,7 @@ send -- "firejail --debug --profile=block-secondary.profile sleep 1; echo done\ | |||
141 | expect { | 141 | expect { |
142 | timeout {puts "TESTING ERROR 33\n";exit} | 142 | timeout {puts "TESTING ERROR 33\n";exit} |
143 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 34\n";exit} | 143 | "Installing /run/firejail/mnt/seccomp/seccomp.32 seccomp filter" {puts "TESTING ERROR 34\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 35\n";exit} | 147 | timeout {puts "TESTING ERROR 35\n";exit} |
diff --git a/test/filters/seccomp-empty.exp b/test/filters/seccomp-empty.exp index 79944b1ba..7a5597727 100755 --- a/test/filters/seccomp-empty.exp +++ b/test/filters/seccomp-empty.exp | |||
@@ -42,7 +42,7 @@ expect { | |||
42 | } | 42 | } |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 0.7\n";exit} | 44 | timeout {puts "TESTING ERROR 0.7\n";exit} |
45 | "Child process initialized" | 45 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
46 | } | 46 | } |
47 | sleep 2 | 47 | sleep 2 |
48 | send -- "exit\r" | 48 | send -- "exit\r" |
@@ -78,7 +78,7 @@ expect { | |||
78 | } | 78 | } |
79 | expect { | 79 | expect { |
80 | timeout {puts "TESTING ERROR 1.7\n";exit} | 80 | timeout {puts "TESTING ERROR 1.7\n";exit} |
81 | "Child process initialized" | 81 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
82 | } | 82 | } |
83 | sleep 2 | 83 | sleep 2 |
84 | send -- "exit\r" | 84 | send -- "exit\r" |
@@ -120,7 +120,7 @@ expect { | |||
120 | } | 120 | } |
121 | expect { | 121 | expect { |
122 | timeout {puts "TESTING ERROR 2.7\n";exit} | 122 | timeout {puts "TESTING ERROR 2.7\n";exit} |
123 | "Child process initialized" | 123 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
124 | } | 124 | } |
125 | sleep 2 | 125 | sleep 2 |
126 | send -- "exit\r" | 126 | send -- "exit\r" |
@@ -156,7 +156,7 @@ expect { | |||
156 | } | 156 | } |
157 | expect { | 157 | expect { |
158 | timeout {puts "TESTING ERROR 3.7\n";exit} | 158 | timeout {puts "TESTING ERROR 3.7\n";exit} |
159 | "Child process initialized" | 159 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
160 | } | 160 | } |
161 | sleep 2 | 161 | sleep 2 |
162 | send -- "exit\r" | 162 | send -- "exit\r" |
diff --git a/test/filters/seccomp-errno.exp b/test/filters/seccomp-errno.exp index 3b6759a40..f5e9ff402 100755 --- a/test/filters/seccomp-errno.exp +++ b/test/filters/seccomp-errno.exp | |||
@@ -31,7 +31,7 @@ sleep 1 | |||
31 | send -- "firejail --seccomp=unlinkat:ENOENT,mkdir:ENOENT\r" | 31 | send -- "firejail --seccomp=unlinkat:ENOENT,mkdir:ENOENT\r" |
32 | expect { | 32 | expect { |
33 | timeout {puts "TESTING ERROR 3\n";exit} | 33 | timeout {puts "TESTING ERROR 3\n";exit} |
34 | "Child process initialized" | 34 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
35 | } | 35 | } |
36 | sleep 1 | 36 | sleep 1 |
37 | send -- "rm seccomp-test-file\r" | 37 | send -- "rm seccomp-test-file\r" |
diff --git a/test/filters/seccomp-ptrace.exp b/test/filters/seccomp-ptrace.exp index c857527d6..9bde7355f 100755 --- a/test/filters/seccomp-ptrace.exp +++ b/test/filters/seccomp-ptrace.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --noprofile --seccomp\r" | 10 | send -- "firejail --noprofile --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 2 | 15 | sleep 2 |
16 | 16 | ||
diff --git a/test/filters/seccomp-su.exp b/test/filters/seccomp-su.exp index ddded4111..d204a4295 100755 --- a/test/filters/seccomp-su.exp +++ b/test/filters/seccomp-su.exp | |||
@@ -10,7 +10,7 @@ match_max 100000 | |||
10 | send -- "firejail --noprofile --seccomp\r" | 10 | send -- "firejail --noprofile --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 2 | 15 | sleep 2 |
16 | 16 | ||