From 7578e86ef8ddb78da44d426b94def77366627e0e Mon Sep 17 00:00:00 2001 From: smitsohu Date: Wed, 9 Feb 2022 18:04:36 +0100 Subject: 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. --- test/features/1.1.exp | 6 +++--- test/features/1.10.exp | 6 +++--- test/features/1.2.exp | 6 +++--- test/features/1.4.exp | 6 +++--- test/features/1.5.exp | 6 +++--- test/features/1.6.exp | 6 +++--- test/features/1.7.exp | 6 +++--- test/features/1.8.exp | 6 +++--- test/features/2.1.exp | 6 +++--- test/features/2.2.exp | 6 +++--- test/features/2.3.exp | 12 ++++++------ test/features/2.4.exp | 12 ++++++------ test/features/2.5.exp | 6 +++--- test/features/2.6.exp | 6 +++--- test/features/3.1.exp | 6 +++--- test/features/3.10.exp | 6 +++--- test/features/3.11.exp | 6 +++--- test/features/3.2.exp | 6 +++--- test/features/3.3.exp | 6 +++--- test/features/3.4.exp | 6 +++--- test/features/3.5.exp | 6 +++--- test/features/3.6.exp | 6 +++--- test/features/3.7.exp | 6 +++--- test/features/3.8.exp | 6 +++--- test/features/3.9.exp | 6 +++--- 25 files changed, 81 insertions(+), 81 deletions(-) (limited to 'test/features') diff --git a/test/features/1.1.exp b/test/features/1.1.exp index 1262ff403..916a610a6 100755 --- a/test/features/1.1.exp +++ b/test/features/1.1.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -40,7 +40,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -61,7 +61,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/1.10.exp b/test/features/1.10.exp index 846532e71..53279f71e 100755 --- a/test/features/1.10.exp +++ b/test/features/1.10.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -41,7 +41,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -63,7 +63,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/1.2.exp b/test/features/1.2.exp index 76b143a40..3043f0104 100755 --- a/test/features/1.2.exp +++ b/test/features/1.2.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -64,7 +64,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -105,7 +105,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/1.4.exp b/test/features/1.4.exp index 7b4839bd7..b7e8246a2 100755 --- a/test/features/1.4.exp +++ b/test/features/1.4.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -53,7 +53,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -86,7 +86,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/1.5.exp b/test/features/1.5.exp index a13a87893..cce8f490f 100755 --- a/test/features/1.5.exp +++ b/test/features/1.5.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -40,7 +40,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -61,7 +61,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/1.6.exp b/test/features/1.6.exp index e53c6e2bf..81da44c64 100755 --- a/test/features/1.6.exp +++ b/test/features/1.6.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -40,7 +40,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -61,7 +61,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/1.7.exp b/test/features/1.7.exp index f0987dcdc..a84b723de 100755 --- a/test/features/1.7.exp +++ b/test/features/1.7.exp @@ -20,7 +20,7 @@ sleep 1 send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -42,7 +42,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -63,7 +63,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/1.8.exp b/test/features/1.8.exp index 36c85e1cf..5f7b0cdbc 100755 --- a/test/features/1.8.exp +++ b/test/features/1.8.exp @@ -19,7 +19,7 @@ sleep 1 send -- "firejail --noprofile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -71,7 +71,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 send -- "ls ~/.config/firejail\r" @@ -122,7 +122,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 send -- "ls ~/.config/firejail\r" diff --git a/test/features/2.1.exp b/test/features/2.1.exp index 586ab6490..b56cbc135 100755 --- a/test/features/2.1.exp +++ b/test/features/2.1.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --hostname=bingo\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -56,7 +56,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -93,7 +93,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --hostname=bingo --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/2.2.exp b/test/features/2.2.exp index 18828de12..378bd529a 100755 --- a/test/features/2.2.exp +++ b/test/features/2.2.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --dns=4.2.2.1\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -48,7 +48,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -77,7 +77,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --dns=4.2.2.1 --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/2.3.exp b/test/features/2.3.exp index dba3a47e1..5a188ccc3 100755 --- a/test/features/2.3.exp +++ b/test/features/2.3.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --net=eth0 --dns=8.8.8.8 --dns=8.8.4.4\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -62,7 +62,7 @@ sleep 3 send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --dns=8.8.8.8 --dns=8.8.4.4\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -111,7 +111,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -155,7 +155,7 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -205,7 +205,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --net=eth0 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -249,7 +249,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --net=eth0 --ip=192.168.1.244 --chroot=/tmp/chroot --dns=8.8.8.8 --dns=8.8.4.4\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/2.4.exp b/test/features/2.4.exp index e2f080617..15159c9b7 100755 --- a/test/features/2.4.exp +++ b/test/features/2.4.exp @@ -19,7 +19,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --net=br0\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -56,7 +56,7 @@ sleep 1 send -- "firejail --noprofile --net=br0 --ip=10.10.20.4\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -99,7 +99,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -136,7 +136,7 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -179,7 +179,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --net=br0 --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -208,7 +208,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --net=br0 --ip=10.10.20.4 --chroot=/tmp/chroot\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/2.5.exp b/test/features/2.5.exp index ed8a01b36..2995d34f7 100755 --- a/test/features/2.5.exp +++ b/test/features/2.5.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --interface=eth0.5\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -51,7 +51,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -84,7 +84,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --interface=eth0.7\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/2.6.exp b/test/features/2.6.exp index 081bdeb94..e8cd780ee 100755 --- a/test/features/2.6.exp +++ b/test/features/2.6.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -39,7 +39,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -60,7 +60,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.1.exp b/test/features/3.1.exp index dcf51fc9c..95d1d609b 100755 --- a/test/features/3.1.exp +++ b/test/features/3.1.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --private\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -70,7 +70,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -120,7 +120,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --private\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.10.exp b/test/features/3.10.exp index e6dbbf93b..5d4414f40 100755 --- a/test/features/3.10.exp +++ b/test/features/3.10.exp @@ -22,7 +22,7 @@ sleep 1 send -- "firejail --noprofile --whitelist=/tmp/test1dir\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -78,7 +78,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -136,7 +136,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/tmp/test1dir\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.11.exp b/test/features/3.11.exp index bf528ef25..8287f9dbf 100755 --- a/test/features/3.11.exp +++ b/test/features/3.11.exp @@ -21,7 +21,7 @@ sleep 1 send -- "firejail --profile=3.11.profile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -73,7 +73,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 10\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -127,7 +127,7 @@ if { $chroot == "chroot" } { send -- "firejail --profile=3.11.profile\r" expect { timeout {puts "TESTING ERROR 20\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.2.exp b/test/features/3.2.exp index b4a0b04fe..9af0513ea 100755 --- a/test/features/3.2.exp +++ b/test/features/3.2.exp @@ -20,7 +20,7 @@ sleep 1 send -- "firejail --noprofile --read-only=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -41,7 +41,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -64,7 +64,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --read-only=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.3.exp b/test/features/3.3.exp index fc1a982ec..71b6f70db 100755 --- a/test/features/3.3.exp +++ b/test/features/3.3.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --blacklist=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -40,7 +40,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -61,7 +61,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --blacklist=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.4.exp b/test/features/3.4.exp index 0e1a7df5f..d3f894da2 100755 --- a/test/features/3.4.exp +++ b/test/features/3.4.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --whitelist=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -83,7 +83,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -147,7 +147,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.5.exp b/test/features/3.5.exp index a595df398..c19680d41 100755 --- a/test/features/3.5.exp +++ b/test/features/3.5.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --private-dev\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -41,7 +41,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -64,7 +64,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --private-dev\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.6.exp b/test/features/3.6.exp index 439b40411..31978e764 100755 --- a/test/features/3.6.exp +++ b/test/features/3.6.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -40,7 +40,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -68,7 +68,7 @@ if { $chroot == "chroot" } { expect { timeout {puts "TESTING ERROR 5\n";exit} "chroot option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.7.exp b/test/features/3.7.exp index b966f34e5..4a0cb0d79 100755 --- a/test/features/3.7.exp +++ b/test/features/3.7.exp @@ -22,7 +22,7 @@ sleep 1 send -- "firejail --noprofile --private-tmp\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -49,7 +49,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -76,7 +76,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --private-tmp\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.8.exp b/test/features/3.8.exp index 0fa74813c..0a53599a9 100755 --- a/test/features/3.8.exp +++ b/test/features/3.8.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --private-bin=bash,cat,cp,ls,wc\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -41,7 +41,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -68,7 +68,7 @@ if { $chroot == "chroot" } { } expect { timeout {puts "TESTING ERROR 5\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/features/3.9.exp b/test/features/3.9.exp index 47db477ca..7d843e7cc 100755 --- a/test/features/3.9.exp +++ b/test/features/3.9.exp @@ -18,7 +18,7 @@ set chroot [lindex $argv 1] send -- "firejail --noprofile --whitelist=/dev/tty --whitelist=/dev/null\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -42,7 +42,7 @@ if { $overlay == "overlay" } { expect { timeout {puts "TESTING ERROR 2\n";exit} "overlay option is not available" {puts "grsecurity\n"; exit} - "Child process initialized" {puts "normal system\n"} + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" {puts "normal system\n"} } sleep 1 @@ -65,7 +65,7 @@ if { $chroot == "chroot" } { send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/dev/tty --whitelist=/dev/null\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 -- cgit v1.2.3-70-g09d2