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/private-lib | |
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/private-lib')
-rwxr-xr-x | test/private-lib/atril.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/eog.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/eom.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/evince.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/galculator.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/gedit.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/gnome-calculator.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/gnome-logs.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/gnome-nettool.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/gnome-system-log.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/gpicview.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/leafpad.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/mousepad.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/pavucontrol.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/pluma.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/transmission-gtk.exp | 4 | ||||
-rwxr-xr-x | test/private-lib/xcalc.exp | 4 |
17 files changed, 34 insertions, 34 deletions
diff --git a/test/private-lib/atril.exp b/test/private-lib/atril.exp index b420f4477..cad118c0a 100755 --- a/test/private-lib/atril.exp +++ b/test/private-lib/atril.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/eog.exp b/test/private-lib/eog.exp index dc6771482..c4bfc0aa7 100755 --- a/test/private-lib/eog.exp +++ b/test/private-lib/eog.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/eom.exp b/test/private-lib/eom.exp index 6ddf3edbe..a7709b0ec 100755 --- a/test/private-lib/eom.exp +++ b/test/private-lib/eom.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/evince.exp b/test/private-lib/evince.exp index e21ce1fb9..8f54ee345 100755 --- a/test/private-lib/evince.exp +++ b/test/private-lib/evince.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/galculator.exp b/test/private-lib/galculator.exp index 7438b0be6..4cf6b6a73 100755 --- a/test/private-lib/galculator.exp +++ b/test/private-lib/galculator.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/gedit.exp b/test/private-lib/gedit.exp index c89630613..838ffad21 100755 --- a/test/private-lib/gedit.exp +++ b/test/private-lib/gedit.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/gnome-calculator.exp b/test/private-lib/gnome-calculator.exp index e0e4b5f8c..37e6b86cb 100755 --- a/test/private-lib/gnome-calculator.exp +++ b/test/private-lib/gnome-calculator.exp | |||
@@ -16,7 +16,7 @@ expect { | |||
16 | } | 16 | } |
17 | expect { | 17 | expect { |
18 | timeout {puts "TESTING ERROR 1\n";exit} | 18 | timeout {puts "TESTING ERROR 1\n";exit} |
19 | "Child process initialized" | 19 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
20 | } | 20 | } |
21 | sleep 3 | 21 | sleep 3 |
22 | 22 | ||
@@ -43,7 +43,7 @@ expect { | |||
43 | send -- "firejail --name=blablabla\r" | 43 | send -- "firejail --name=blablabla\r" |
44 | expect { | 44 | expect { |
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 | } |
48 | sleep 2 | 48 | sleep 2 |
49 | 49 | ||
diff --git a/test/private-lib/gnome-logs.exp b/test/private-lib/gnome-logs.exp index c5ed97578..3f0cc3544 100755 --- a/test/private-lib/gnome-logs.exp +++ b/test/private-lib/gnome-logs.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/gnome-nettool.exp b/test/private-lib/gnome-nettool.exp index 51382ba0b..3a08fe3df 100755 --- a/test/private-lib/gnome-nettool.exp +++ b/test/private-lib/gnome-nettool.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/gnome-system-log.exp b/test/private-lib/gnome-system-log.exp index 60047e020..5ab819a89 100755 --- a/test/private-lib/gnome-system-log.exp +++ b/test/private-lib/gnome-system-log.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/gpicview.exp b/test/private-lib/gpicview.exp index 7aa9e6e16..ea0964787 100755 --- a/test/private-lib/gpicview.exp +++ b/test/private-lib/gpicview.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/leafpad.exp b/test/private-lib/leafpad.exp index 79f13d98c..9e4dc7fed 100755 --- a/test/private-lib/leafpad.exp +++ b/test/private-lib/leafpad.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/mousepad.exp b/test/private-lib/mousepad.exp index 96923caa9..9c7501473 100755 --- a/test/private-lib/mousepad.exp +++ b/test/private-lib/mousepad.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/pavucontrol.exp b/test/private-lib/pavucontrol.exp index 896a53863..3aeda709a 100755 --- a/test/private-lib/pavucontrol.exp +++ b/test/private-lib/pavucontrol.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/pluma.exp b/test/private-lib/pluma.exp index 955142511..64cb16d5a 100755 --- a/test/private-lib/pluma.exp +++ b/test/private-lib/pluma.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/transmission-gtk.exp b/test/private-lib/transmission-gtk.exp index 4ecc4fa5a..0f297cc42 100755 --- a/test/private-lib/transmission-gtk.exp +++ b/test/private-lib/transmission-gtk.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||
diff --git a/test/private-lib/xcalc.exp b/test/private-lib/xcalc.exp index 6eb56e360..e9c541684 100755 --- a/test/private-lib/xcalc.exp +++ b/test/private-lib/xcalc.exp | |||
@@ -14,7 +14,7 @@ expect { | |||
14 | } | 14 | } |
15 | expect { | 15 | expect { |
16 | timeout {puts "TESTING ERROR 1\n";exit} | 16 | timeout {puts "TESTING ERROR 1\n";exit} |
17 | "Child process initialized" | 17 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
18 | } | 18 | } |
19 | sleep 3 | 19 | sleep 3 |
20 | 20 | ||
@@ -41,7 +41,7 @@ expect { | |||
41 | send -- "firejail --name=blablabla\r" | 41 | send -- "firejail --name=blablabla\r" |
42 | expect { | 42 | expect { |
43 | timeout {puts "TESTING ERROR 4\n";exit} | 43 | timeout {puts "TESTING ERROR 4\n";exit} |
44 | "Child process initialized" | 44 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" |
45 | } | 45 | } |
46 | sleep 2 | 46 | sleep 2 |
47 | 47 | ||