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/profiles/ignore.exp | |
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/profiles/ignore.exp')
-rwxr-xr-x | test/profiles/ignore.exp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/profiles/ignore.exp b/test/profiles/ignore.exp index 7d13a8b72..df4337e1e 100755 --- a/test/profiles/ignore.exp +++ b/test/profiles/ignore.exp | |||
@@ -17,7 +17,7 @@ send -- "firejail --debug --ignore=seccomp\r" | |||
17 | expect { | 17 | expect { |
18 | timeout {puts "TESTING ERROR 1\n";exit} | 18 | timeout {puts "TESTING ERROR 1\n";exit} |
19 | BLACKLIST {puts "TESTING ERROR 2\n";exit} | 19 | BLACKLIST {puts "TESTING ERROR 2\n";exit} |
20 | "Child process initialized" | 20 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
21 | } | 21 | } |
22 | after 100 | 22 | after 100 |
23 | send -- "exit\r" | 23 | send -- "exit\r" |
@@ -26,7 +26,7 @@ sleep 1 | |||
26 | send -- "firejail --ignore=seccomp --ignore=shell --profile=ignore.profile \r" | 26 | send -- "firejail --ignore=seccomp --ignore=shell --profile=ignore.profile \r" |
27 | expect { | 27 | expect { |
28 | timeout {puts "TESTING ERROR 3\n";exit} | 28 | timeout {puts "TESTING ERROR 3\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 | ||
@@ -42,7 +42,7 @@ sleep 1 | |||
42 | send -- "firejail --ignore=private --ignore=shell --profile=ignore.profile \r" | 42 | send -- "firejail --ignore=private --ignore=shell --profile=ignore.profile \r" |
43 | expect { | 43 | expect { |
44 | timeout {puts "TESTING ERROR 5\n";exit} | 44 | timeout {puts "TESTING ERROR 5\n";exit} |
45 | "Child process initialized" | 45 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
46 | } | 46 | } |
47 | after 100 | 47 | after 100 |
48 | 48 | ||
@@ -59,7 +59,7 @@ send -- "firejail --debug --profile=ignore2.profile\r" | |||
59 | expect { | 59 | expect { |
60 | timeout {puts "TESTING ERROR 7\n";exit} | 60 | timeout {puts "TESTING ERROR 7\n";exit} |
61 | BLACKLIST {puts "TESTING ERROR 8\n";exit} | 61 | BLACKLIST {puts "TESTING ERROR 8\n";exit} |
62 | "Child process initialized" | 62 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
63 | } | 63 | } |
64 | 64 | ||
65 | after 100 | 65 | after 100 |
@@ -69,7 +69,7 @@ sleep 1 | |||
69 | send -- "firejail --ignore=quiet --ignore=shell --profile=ignore.profile \r" | 69 | send -- "firejail --ignore=quiet --ignore=shell --profile=ignore.profile \r" |
70 | expect { | 70 | expect { |
71 | timeout {puts "TESTING ERROR 9\n";exit} | 71 | timeout {puts "TESTING ERROR 9\n";exit} |
72 | "Child process initialized" | 72 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
73 | } | 73 | } |
74 | after 100 | 74 | after 100 |
75 | 75 | ||