aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters/seccomp-debug-32.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/filters/seccomp-debug-32.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/filters/seccomp-debug-32.exp')
-rwxr-xr-xtest/filters/seccomp-debug-32.exp12
1 files changed, 6 insertions, 6 deletions
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}
22expect { 22expect {
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}
26expect { 26expect {
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}
41expect { 41expect {
42 timeout {puts "TESTING ERROR 16\n";exit} 42 timeout {puts "TESTING ERROR 16\n";exit}
@@ -48,7 +48,7 @@ after 100
48send -- "firejail --debug --ignore=protocol sleep 1; echo done\r" 48send -- "firejail --debug --ignore=protocol sleep 1; echo done\r"
49expect { 49expect {
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}
53expect { 53expect {
54 timeout {puts "TESTING ERROR 19\n";exit} 54 timeout {puts "TESTING ERROR 19\n";exit}
@@ -65,7 +65,7 @@ after 100
65send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r" 65send -- "firejail --debug --memory-deny-write-execute sleep 1; echo done\r"
66expect { 66expect {
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}
70expect { 70expect {
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"
82expect { 82expect {
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}
87expect { 87expect {
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\
105expect { 105expect {
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}
110expect { 110expect {
111 timeout {puts "TESTING ERROR 35\n";exit} 111 timeout {puts "TESTING ERROR 35\n";exit}