diff options
author | 2022-02-09 18:04:36 +0100 | |
---|---|---|
committer | 2022-02-09 18:30:45 +0100 | |
commit | 7578e86ef8ddb78da44d426b94def77366627e0e (patch) | |
tree | e752d23f1b61a50fb7b7372d6799fe9ef4d111e4 /test/root/whitelist.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/root/whitelist.exp')
-rwxr-xr-x | test/root/whitelist.exp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/root/whitelist.exp b/test/root/whitelist.exp index 1e29e3fef..2397f6a90 100755 --- a/test/root/whitelist.exp +++ b/test/root/whitelist.exp | |||
@@ -16,7 +16,7 @@ after 100 | |||
16 | send -- "firejail --whitelist=/mnt/firejail-test-file --whitelist=/mnt/firejail-test-dir --debug\r" | 16 | send -- "firejail --whitelist=/mnt/firejail-test-file --whitelist=/mnt/firejail-test-dir --debug\r" |
17 | expect { | 17 | expect { |
18 | timeout {puts "TESTING ERROR 0\n";exit} | 18 | timeout {puts "TESTING ERROR 0\n";exit} |
19 | "Child process initialized" | 19 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
20 | } | 20 | } |
21 | sleep 1 | 21 | sleep 1 |
22 | 22 | ||
@@ -39,7 +39,7 @@ after 100 | |||
39 | send -- "firejail --whitelist=/opt/firejail-test-file --whitelist=/opt/firejail-test-dir --debug\r" | 39 | send -- "firejail --whitelist=/opt/firejail-test-file --whitelist=/opt/firejail-test-dir --debug\r" |
40 | expect { | 40 | expect { |
41 | timeout {puts "TESTING ERROR 2\n";exit} | 41 | timeout {puts "TESTING ERROR 2\n";exit} |
42 | "Child process initialized" | 42 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
43 | } | 43 | } |
44 | sleep 1 | 44 | sleep 1 |
45 | 45 | ||
@@ -61,7 +61,7 @@ after 100 | |||
61 | send -- "firejail --whitelist=/media/firejail-test-file --whitelist=/media/firejail-test-dir --debug\r" | 61 | send -- "firejail --whitelist=/media/firejail-test-file --whitelist=/media/firejail-test-dir --debug\r" |
62 | expect { | 62 | expect { |
63 | timeout {puts "TESTING ERROR 4\n";exit} | 63 | timeout {puts "TESTING ERROR 4\n";exit} |
64 | "Child process initialized" | 64 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
65 | } | 65 | } |
66 | sleep 1 | 66 | sleep 1 |
67 | 67 | ||
@@ -78,7 +78,7 @@ sleep 1 | |||
78 | send -- "firejail --whitelist=/var/run --whitelist=/var/lock --debug\r" | 78 | send -- "firejail --whitelist=/var/run --whitelist=/var/lock --debug\r" |
79 | expect { | 79 | expect { |
80 | timeout {puts "TESTING ERROR 6\n";exit} | 80 | timeout {puts "TESTING ERROR 6\n";exit} |
81 | "Child process initialized" | 81 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
82 | } | 82 | } |
83 | sleep 1 | 83 | sleep 1 |
84 | 84 | ||
@@ -100,7 +100,7 @@ after 100 | |||
100 | send -- "firejail --whitelist=/srv/firejail-test-file --whitelist=/srv/firejail-test-dir --debug\r" | 100 | send -- "firejail --whitelist=/srv/firejail-test-file --whitelist=/srv/firejail-test-dir --debug\r" |
101 | expect { | 101 | expect { |
102 | timeout {puts "TESTING ERROR 8\n";exit} | 102 | timeout {puts "TESTING ERROR 8\n";exit} |
103 | "Child process initialized" | 103 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
104 | } | 104 | } |
105 | sleep 1 | 105 | sleep 1 |
106 | 106 | ||