aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/name.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/utils/name.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/utils/name.exp')
-rwxr-xr-xtest/utils/name.exp24
1 files changed, 12 insertions, 12 deletions
diff --git a/test/utils/name.exp b/test/utils/name.exp
index ade119183..cd4465d41 100755
--- a/test/utils/name.exp
+++ b/test/utils/name.exp
@@ -11,7 +11,7 @@ match_max 100000
11send -- "firejail --name=ftest\r" 11send -- "firejail --name=ftest\r"
12expect { 12expect {
13 timeout {puts "TESTING ERROR 0\n";exit} 13 timeout {puts "TESTING ERROR 0\n";exit}
14 "Child process initialized" 14 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
15} 15}
16after 100 16after 100
17 17
@@ -19,7 +19,7 @@ spawn $env(SHELL)
19send -- "firejail --name=ftest\r" 19send -- "firejail --name=ftest\r"
20expect { 20expect {
21 timeout {puts "TESTING ERROR 1\n";exit} 21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Child process initialized" 22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
23} 23}
24after 100 24after 100
25 25
@@ -27,7 +27,7 @@ spawn $env(SHELL)
27send -- "firejail --name=ftest\r" 27send -- "firejail --name=ftest\r"
28expect { 28expect {
29 timeout {puts "TESTING ERROR 2\n";exit} 29 timeout {puts "TESTING ERROR 2\n";exit}
30 "Child process initialized" 30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31} 31}
32after 100 32after 100
33 33
@@ -35,7 +35,7 @@ spawn $env(SHELL)
35send -- "firejail --name=ftest\r" 35send -- "firejail --name=ftest\r"
36expect { 36expect {
37 timeout {puts "TESTING ERROR 3\n";exit} 37 timeout {puts "TESTING ERROR 3\n";exit}
38 "Child process initialized" 38 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
39} 39}
40after 100 40after 100
41 41
@@ -43,7 +43,7 @@ spawn $env(SHELL)
43send -- "firejail --name=ftest\r" 43send -- "firejail --name=ftest\r"
44expect { 44expect {
45 timeout {puts "TESTING ERROR 4\n";exit} 45 timeout {puts "TESTING ERROR 4\n";exit}
46 "Child process initialized" 46 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
47} 47}
48after 100 48after 100
49 49
@@ -51,7 +51,7 @@ spawn $env(SHELL)
51send -- "firejail --name=ftest\r" 51send -- "firejail --name=ftest\r"
52expect { 52expect {
53 timeout {puts "TESTING ERROR 5\n";exit} 53 timeout {puts "TESTING ERROR 5\n";exit}
54 "Child process initialized" 54 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
55} 55}
56after 100 56after 100
57 57
@@ -59,7 +59,7 @@ spawn $env(SHELL)
59send -- "firejail --name=ftest\r" 59send -- "firejail --name=ftest\r"
60expect { 60expect {
61 timeout {puts "TESTING ERROR 6\n";exit} 61 timeout {puts "TESTING ERROR 6\n";exit}
62 "Child process initialized" 62 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
63} 63}
64after 100 64after 100
65 65
@@ -67,7 +67,7 @@ spawn $env(SHELL)
67send -- "firejail --name=ftest\r" 67send -- "firejail --name=ftest\r"
68expect { 68expect {
69 timeout {puts "TESTING ERROR 7\n";exit} 69 timeout {puts "TESTING ERROR 7\n";exit}
70 "Child process initialized" 70 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
71} 71}
72after 100 72after 100
73 73
@@ -75,7 +75,7 @@ spawn $env(SHELL)
75send -- "firejail --name=ftest\r" 75send -- "firejail --name=ftest\r"
76expect { 76expect {
77 timeout {puts "TESTING ERROR 8\n";exit} 77 timeout {puts "TESTING ERROR 8\n";exit}
78 "Child process initialized" 78 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
79} 79}
80after 100 80after 100
81 81
@@ -83,7 +83,7 @@ spawn $env(SHELL)
83send -- "firejail --name=ftest\r" 83send -- "firejail --name=ftest\r"
84expect { 84expect {
85 timeout {puts "TESTING ERROR 9\n";exit} 85 timeout {puts "TESTING ERROR 9\n";exit}
86 "Child process initialized" 86 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
87} 87}
88after 100 88after 100
89 89
@@ -91,7 +91,7 @@ spawn $env(SHELL)
91send -- "firejail --name=ftest\r" 91send -- "firejail --name=ftest\r"
92expect { 92expect {
93 timeout {puts "TESTING ERROR 10\n";exit} 93 timeout {puts "TESTING ERROR 10\n";exit}
94 "Child process initialized" 94 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
95} 95}
96after 100 96after 100
97 97
@@ -99,7 +99,7 @@ spawn $env(SHELL)
99send -- "firejail --name=ftest\r" 99send -- "firejail --name=ftest\r"
100expect { 100expect {
101 timeout {puts "TESTING ERROR 11\n";exit} 101 timeout {puts "TESTING ERROR 11\n";exit}
102 "Child process initialized" 102 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
103} 103}
104after 100 104after 100
105 105