aboutsummaryrefslogtreecommitdiffstats
path: root/test/profiles/ignore.exp
diff options
context:
space:
mode:
authorLibravatar smitsohu <smitsohu@gmail.com>2022-02-09 18:04:36 +0100
committerLibravatar smitsohu <smitsohu@gmail.com>2022-02-09 18:30:45 +0100
commit7578e86ef8ddb78da44d426b94def77366627e0e (patch)
treee752d23f1b61a50fb7b7372d6799fe9ef4d111e4 /test/profiles/ignore.exp
parentMerge pull request #4915 from kmk3/keepassx-restore-nou2f (diff)
downloadfirejail-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-xtest/profiles/ignore.exp10
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"
17expect { 17expect {
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}
22after 100 22after 100
23send -- "exit\r" 23send -- "exit\r"
@@ -26,7 +26,7 @@ sleep 1
26send -- "firejail --ignore=seccomp --ignore=shell --profile=ignore.profile \r" 26send -- "firejail --ignore=seccomp --ignore=shell --profile=ignore.profile \r"
27expect { 27expect {
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}
31after 100 31after 100
32 32
@@ -42,7 +42,7 @@ sleep 1
42send -- "firejail --ignore=private --ignore=shell --profile=ignore.profile \r" 42send -- "firejail --ignore=private --ignore=shell --profile=ignore.profile \r"
43expect { 43expect {
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}
47after 100 47after 100
48 48
@@ -59,7 +59,7 @@ send -- "firejail --debug --profile=ignore2.profile\r"
59expect { 59expect {
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
65after 100 65after 100
@@ -69,7 +69,7 @@ sleep 1
69send -- "firejail --ignore=quiet --ignore=shell --profile=ignore.profile \r" 69send -- "firejail --ignore=quiet --ignore=shell --profile=ignore.profile \r"
70expect { 70expect {
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}
74after 100 74after 100
75 75