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/fs/fs_dev_shm.exp | 4 ++-- test/fs/fs_var_lock.exp | 4 ++-- test/fs/fs_var_tmp.exp | 4 ++-- test/fs/fscheck-tmpfs.exp | 2 +- test/fs/kmsg.exp | 2 +- test/fs/macro.exp | 26 +++++++++++++------------- test/fs/mkdir_mkfile.exp | 2 +- test/fs/noblacklist-blacklist-noexec.exp | 2 +- test/fs/noblacklist-blacklist-readonly.exp | 2 +- test/fs/option_blacklist.exp | 2 +- test/fs/option_blacklist_file.exp | 2 +- test/fs/option_blacklist_glob.exp | 2 +- test/fs/private-bin.exp | 4 ++-- test/fs/private-cache.exp | 2 +- test/fs/private-etc-empty.exp | 4 ++-- test/fs/private-etc.exp | 2 +- test/fs/private-home-dir.exp | 4 ++-- test/fs/private-home.exp | 4 ++-- test/fs/private-homedir.exp | 2 +- test/fs/private-lib.exp | 2 +- test/fs/private-whitelist.exp | 2 +- test/fs/private.exp | 2 +- test/fs/read-write.exp | 2 +- test/fs/sys_fs.exp | 4 ++-- test/fs/whitelist-dev.exp | 12 ++++++------ test/fs/whitelist-double.exp | 2 +- test/fs/whitelist-empty.exp | 2 +- test/fs/whitelist-noexec.exp | 2 +- test/fs/whitelist-readonly.exp | 2 +- test/fs/whitelist-whitespace.exp | 2 +- test/fs/whitelist.exp | 6 +++--- 31 files changed, 58 insertions(+), 58 deletions(-) (limited to 'test/fs') diff --git a/test/fs/fs_dev_shm.exp b/test/fs/fs_dev_shm.exp index 0c819fe99..5d57a8975 100755 --- a/test/fs/fs_dev_shm.exp +++ b/test/fs/fs_dev_shm.exp @@ -11,7 +11,7 @@ match_max 100000 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" @@ -52,7 +52,7 @@ sleep 1 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 7\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" diff --git a/test/fs/fs_var_lock.exp b/test/fs/fs_var_lock.exp index e2efd389d..ce3eb836e 100755 --- a/test/fs/fs_var_lock.exp +++ b/test/fs/fs_var_lock.exp @@ -11,7 +11,7 @@ match_max 100000 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" @@ -53,7 +53,7 @@ sleep 1 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 7\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" diff --git a/test/fs/fs_var_tmp.exp b/test/fs/fs_var_tmp.exp index b8e7ea73d..8c2da085f 100755 --- a/test/fs/fs_var_tmp.exp +++ b/test/fs/fs_var_tmp.exp @@ -11,7 +11,7 @@ match_max 100000 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" @@ -53,7 +53,7 @@ sleep 1 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 7\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" diff --git a/test/fs/fscheck-tmpfs.exp b/test/fs/fscheck-tmpfs.exp index c9d237d72..223bb63ba 100755 --- a/test/fs/fscheck-tmpfs.exp +++ b/test/fs/fscheck-tmpfs.exp @@ -24,7 +24,7 @@ if { ! [file exists /tmp/fjtest-dir] } { send -- "firejail --noprofile --tmpfs=~/fjtest-dir\r" expect { timeout {puts "TESTING ERROR 3\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 500 diff --git a/test/fs/kmsg.exp b/test/fs/kmsg.exp index acaca2cd0..e7d765bff 100755 --- a/test/fs/kmsg.exp +++ b/test/fs/kmsg.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/macro.exp b/test/fs/macro.exp index 1d32a9cd0..c01123f41 100755 --- a/test/fs/macro.exp +++ b/test/fs/macro.exp @@ -11,7 +11,7 @@ match_max 100000 send -- "firejail --profile=macro-whitelist.profile ls ~\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 1\n";exit} @@ -42,7 +42,7 @@ sleep 1 send -- "firejail --profile=macro-blacklist.profile ls ~/Desktop\r" expect { timeout {puts "TESTING ERROR 7\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 8\n";exit} @@ -53,7 +53,7 @@ sleep 1 send -- "firejail --profile=macro-blacklist.profile ls ~/Documents\r" expect { timeout {puts "TESTING ERROR 9n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 10\n";exit} @@ -64,7 +64,7 @@ sleep 1 send -- "firejail --profile=macro-blacklist.profile ls ~/Downloads\r" expect { timeout {puts "TESTING ERROR 11n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 12n";exit} @@ -75,7 +75,7 @@ sleep 1 send -- "firejail --profile=macro-blacklist.profile ls ~/Music\r" expect { timeout {puts "TESTING ERROR 13\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 14\n";exit} @@ -86,7 +86,7 @@ sleep 1 send -- "firejail --profile=macro-blacklist.profile ls ~/Pictures\r" expect { timeout {puts "TESTING ERROR 15\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 16\n";exit} @@ -97,7 +97,7 @@ sleep 1 send -- "firejail --profile=macro-blacklist.profile ls ~/Videos\r" expect { timeout {puts "TESTING ERROR 17\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 18\n";exit} @@ -108,7 +108,7 @@ sleep 1 send -- "firejail --profile=macro-readonly.profile touch ~/Desktop/blablabla\r" expect { timeout {puts "TESTING ERROR 19\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 20\n";exit} @@ -119,7 +119,7 @@ sleep 1 send -- "firejail --profile=macro-readonly.profile touch ~/Documents/blablabla\r" expect { timeout {puts "TESTING ERROR 21\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 22\n";exit} @@ -130,7 +130,7 @@ sleep 1 send -- "firejail --profile=macro-readonly.profile touch ~/Downloads/blablabla\r" expect { timeout {puts "TESTING ERROR 23\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 24\n";exit} @@ -141,7 +141,7 @@ sleep 1 send -- "firejail --profile=macro-readonly.profile touch ~/Music/blablabla\r" expect { timeout {puts "TESTING ERROR 25\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 26\n";exit} @@ -152,7 +152,7 @@ sleep 1 send -- "firejail --profile=macro-readonly.profile touch ~/Pictures/blablabla\r" expect { timeout {puts "TESTING ERROR 27\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 28\n";exit} @@ -163,7 +163,7 @@ sleep 1 send -- "firejail --profile=macro-readonly.profile touch ~/Videos/blablabla\r" expect { timeout {puts "TESTING ERROR 29\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 30\n";exit} diff --git a/test/fs/mkdir_mkfile.exp b/test/fs/mkdir_mkfile.exp index 406f2c87f..c1dce58ea 100755 --- a/test/fs/mkdir_mkfile.exp +++ b/test/fs/mkdir_mkfile.exp @@ -12,7 +12,7 @@ match_max 100000 send -- "firejail --private --profile=mkdir_mkfile.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 diff --git a/test/fs/noblacklist-blacklist-noexec.exp b/test/fs/noblacklist-blacklist-noexec.exp index 7a3fb8263..3bc5e7c79 100755 --- a/test/fs/noblacklist-blacklist-noexec.exp +++ b/test/fs/noblacklist-blacklist-noexec.exp @@ -12,7 +12,7 @@ set PWD $env(PWD) send -- "firejail --noprofile --noblacklist=$PWD --blacklist=$PWD --noexec=$PWD\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/noblacklist-blacklist-readonly.exp b/test/fs/noblacklist-blacklist-readonly.exp index d164184e7..b5d3ef045 100755 --- a/test/fs/noblacklist-blacklist-readonly.exp +++ b/test/fs/noblacklist-blacklist-readonly.exp @@ -11,7 +11,7 @@ match_max 100000 send -- "firejail --noprofile --noblacklist=~ --blacklist=~ --read-only=~\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/option_blacklist.exp b/test/fs/option_blacklist.exp index f3e1ec5a1..9e1533435 100755 --- a/test/fs/option_blacklist.exp +++ b/test/fs/option_blacklist.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail --blacklist=/var\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" diff --git a/test/fs/option_blacklist_file.exp b/test/fs/option_blacklist_file.exp index 638c25f6a..93284a140 100755 --- a/test/fs/option_blacklist_file.exp +++ b/test/fs/option_blacklist_file.exp @@ -15,7 +15,7 @@ after 100 send -- "firejail --blacklist=/etc/passwd --blacklist=~/_firejail_test_dir\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/option_blacklist_glob.exp b/test/fs/option_blacklist_glob.exp index bea08767e..83b123a4b 100755 --- a/test/fs/option_blacklist_glob.exp +++ b/test/fs/option_blacklist_glob.exp @@ -19,7 +19,7 @@ after 100 send -- "firejail --blacklist=~/_firejail_test_dir/*\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 send -- "cd ~/_firejail_test_dir\r" diff --git a/test/fs/private-bin.exp b/test/fs/private-bin.exp index 301141579..e4b36e114 100755 --- a/test/fs/private-bin.exp +++ b/test/fs/private-bin.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail --private-bin=bash,ls,sh\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -40,7 +40,7 @@ sleep 1 send -- "firejail --profile=private-bin.profile\r" expect { timeout {puts "TESTING ERROR 7\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/private-cache.exp b/test/fs/private-cache.exp index 4abfdcef0..f21d799b4 100755 --- a/test/fs/private-cache.exp +++ b/test/fs/private-cache.exp @@ -21,7 +21,7 @@ if { ! [file exists ~/.cache/abcdefg] } { send -- "firejail --noprofile --private-cache\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/private-etc-empty.exp b/test/fs/private-etc-empty.exp index f1ced02c7..6878a642c 100755 --- a/test/fs/private-etc-empty.exp +++ b/test/fs/private-etc-empty.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail --private-etc=blablabla\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -26,7 +26,7 @@ sleep 1 send -- "firejail --profile=private-etc-empty.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 diff --git a/test/fs/private-etc.exp b/test/fs/private-etc.exp index 2b7fcd83d..f51fc5221 100755 --- a/test/fs/private-etc.exp +++ b/test/fs/private-etc.exp @@ -11,7 +11,7 @@ match_max 100000 send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/private-home-dir.exp b/test/fs/private-home-dir.exp index 14eebaf8b..e46d2b113 100755 --- a/test/fs/private-home-dir.exp +++ b/test/fs/private-home-dir.exp @@ -30,7 +30,7 @@ sleep 1 send -- "firejail --private=~/_firejail_test_dir1_\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 @@ expect { } expect { timeout {puts "TESTING ERROR 12\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/private-home.exp b/test/fs/private-home.exp index fbe40a89b..99456a211 100755 --- a/test/fs/private-home.exp +++ b/test/fs/private-home.exp @@ -26,7 +26,7 @@ after 100 send -- "firejail --private-home=_firejail_test_file1,_firejail_test_file2,_firejail_test_dir1\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 @@ -86,7 +86,7 @@ after 100 send -- "firejail --private-home=_firejail_test_link2\r" expect { timeout {puts "TESTING ERROR 10\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "file ~/_firejail_test_link2\r" diff --git a/test/fs/private-homedir.exp b/test/fs/private-homedir.exp index f14d20c7b..0b4348514 100755 --- a/test/fs/private-homedir.exp +++ b/test/fs/private-homedir.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail --private=~\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp index 6ad48beb7..5290def35 100755 --- a/test/fs/private-lib.exp +++ b/test/fs/private-lib.exp @@ -11,7 +11,7 @@ match_max 100000 send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty \r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 send -- "stty -echo\r" diff --git a/test/fs/private-whitelist.exp b/test/fs/private-whitelist.exp index 1c2a13d16..48add880c 100755 --- a/test/fs/private-whitelist.exp +++ b/test/fs/private-whitelist.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail --private --whitelist=/tmp/.X11-unix\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } after 100 diff --git a/test/fs/private.exp b/test/fs/private.exp index d2cac6b05..ff8e0c66e 100755 --- a/test/fs/private.exp +++ b/test/fs/private.exp @@ -26,7 +26,7 @@ after 100 send -- "firejail --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 diff --git a/test/fs/read-write.exp b/test/fs/read-write.exp index 138834209..f0ef0842c 100755 --- a/test/fs/read-write.exp +++ b/test/fs/read-write.exp @@ -19,7 +19,7 @@ after 100 send -- "firejail --read-only=~/_firejail_test_dir --read-write=~/_firejail_test_dir/test1\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/sys_fs.exp b/test/fs/sys_fs.exp index f501b48ca..ce1fb04de 100755 --- a/test/fs/sys_fs.exp +++ b/test/fs/sys_fs.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -27,7 +27,7 @@ sleep 1 send -- "firejail --noblacklist=/sys/fs\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/whitelist-dev.exp b/test/fs/whitelist-dev.exp index 83e6bad49..7459462f8 100755 --- a/test/fs/whitelist-dev.exp +++ b/test/fs/whitelist-dev.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail --whitelist=/dev/null --debug\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -26,7 +26,7 @@ sleep 1 send -- "firejail --whitelist=/dev/null --whitelist=/dev/random\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -42,7 +42,7 @@ sleep 1 send -- "firejail --private-dev --debug\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -97,7 +97,7 @@ if { $have_snd > 0 } { send -- "firejail --private-dev --nosound ls /dev\r" expect { timeout {puts "TESTING ERROR 7\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 8\n";exit} @@ -114,7 +114,7 @@ if { $have_dvd > 0 } { send -- "firejail --private-dev --nodvd ls /dev\r" expect { timeout {puts "TESTING ERROR 10\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 11\n";exit} @@ -135,7 +135,7 @@ if { $have_dri > 0 } { send -- "firejail --private-dev --no3d ls /dev\r" expect { timeout {puts "TESTING ERROR 17\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 18\n";exit} diff --git a/test/fs/whitelist-double.exp b/test/fs/whitelist-double.exp index f9eeee038..b3b48f2cd 100755 --- a/test/fs/whitelist-double.exp +++ b/test/fs/whitelist-double.exp @@ -13,7 +13,7 @@ sleep 1 send -- "firejail --whitelist=/tmp/_firejail_test_file --whitelist=/tmp/_firejail_test_file\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/whitelist-empty.exp b/test/fs/whitelist-empty.exp index cd72b3ef9..18d4561d6 100755 --- a/test/fs/whitelist-empty.exp +++ b/test/fs/whitelist-empty.exp @@ -10,7 +10,7 @@ match_max 100000 send -- "firejail --whitelist=~/blablabla --whitelist=/tmp/blablabla --whitelist=/media/blablabla --whitelist=/var/blablabla --whitelist=/dev/blablabla --whitelist=/opt/blablabla\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/whitelist-noexec.exp b/test/fs/whitelist-noexec.exp index d997aba72..ba3ca4d92 100755 --- a/test/fs/whitelist-noexec.exp +++ b/test/fs/whitelist-noexec.exp @@ -12,7 +12,7 @@ set PWD $env(PWD) send -- "firejail --noprofile --whitelist=$PWD --noexec=$PWD\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/whitelist-readonly.exp b/test/fs/whitelist-readonly.exp index 4c29c746b..676131ade 100755 --- a/test/fs/whitelist-readonly.exp +++ b/test/fs/whitelist-readonly.exp @@ -19,7 +19,7 @@ after 100 send -- "firejail --noprofile --whitelist=~/_firejail_test_dir --read-only=~\r" expect { timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/whitelist-whitespace.exp b/test/fs/whitelist-whitespace.exp index 66a4f8549..885b90f2a 100755 --- a/test/fs/whitelist-whitespace.exp +++ b/test/fs/whitelist-whitespace.exp @@ -13,7 +13,7 @@ after 100 send -- "firejail --noprofile --whitelist=~/filewith\\\ \\\ many\\\ whitespaces\\\ \r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 diff --git a/test/fs/whitelist.exp b/test/fs/whitelist.exp index 2a970ca37..8e98b9dfa 100755 --- a/test/fs/whitelist.exp +++ b/test/fs/whitelist.exp @@ -36,7 +36,7 @@ after 200 send -- "firejail --whitelist=~/fjtest-file --whitelist=~/fjtest-dir --debug\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 @@ sleep 1 send -- "firejail --whitelist=~/fjtest-dir/fjtest-dir/fjtest-file\r" expect { timeout {puts "TESTING ERROR 10\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 @@ -98,7 +98,7 @@ sleep 1 send -- "firejail --whitelist=~/fjtest-file-lnk --whitelist=~/fjtest-dir-lnk\r" expect { timeout {puts "TESTING ERROR 20\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 1 -- cgit v1.2.3-54-g00ecf