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/apps/chromium.exp | 4 ++-- test/apps/deluge.exp | 4 ++-- test/apps/fbreader.exp | 4 ++-- test/apps/filezilla.exp | 4 ++-- test/apps/firefox.exp | 4 ++-- test/apps/gnome-mplayer.exp | 4 ++-- test/apps/gthumb.exp | 4 ++-- test/apps/hexchat.exp | 4 ++-- test/apps/kcalc.exp | 4 ++-- test/apps/ktorrent.exp | 4 ++-- test/apps/midori.exp | 4 ++-- test/apps/opera.exp | 4 ++-- test/apps/qbittorrent.exp | 4 ++-- test/apps/thunderbird.exp | 4 ++-- test/apps/transmission-qt.exp | 4 ++-- test/apps/uget-gtk.exp | 4 ++-- test/apps/vlc.exp | 4 ++-- test/apps/wine.exp | 2 +- test/apps/xchat.exp | 4 ++-- 19 files changed, 37 insertions(+), 37 deletions(-) (limited to 'test/apps') diff --git a/test/apps/chromium.exp b/test/apps/chromium.exp index 0248f9d88..4e036dee9 100755 --- a/test/apps/chromium.exp +++ b/test/apps/chromium.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 10 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/deluge.exp b/test/apps/deluge.exp index efe964b75..5df35fce4 100755 --- a/test/apps/deluge.exp +++ b/test/apps/deluge.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 10 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/fbreader.exp b/test/apps/fbreader.exp index 1d5c6df79..ebb21bcf2 100755 --- a/test/apps/fbreader.exp +++ b/test/apps/fbreader.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/filezilla.exp b/test/apps/filezilla.exp index b1397278c..397904860 100755 --- a/test/apps/filezilla.exp +++ b/test/apps/filezilla.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/firefox.exp b/test/apps/firefox.exp index 706e97e18..f09c76b5d 100755 --- a/test/apps/firefox.exp +++ b/test/apps/firefox.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 10 @@ -47,7 +47,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/gnome-mplayer.exp b/test/apps/gnome-mplayer.exp index 64530e957..4d7ccff81 100755 --- a/test/apps/gnome-mplayer.exp +++ b/test/apps/gnome-mplayer.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 5 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/gthumb.exp b/test/apps/gthumb.exp index 4a381677f..0da1572b2 100755 --- a/test/apps/gthumb.exp +++ b/test/apps/gthumb.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/hexchat.exp b/test/apps/hexchat.exp index 20d8dbd0f..8ed823dd5 100755 --- a/test/apps/hexchat.exp +++ b/test/apps/hexchat.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/kcalc.exp b/test/apps/kcalc.exp index 6c2769b8f..d7251eec1 100755 --- a/test/apps/kcalc.exp +++ b/test/apps/kcalc.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/ktorrent.exp b/test/apps/ktorrent.exp index 98f51dcd5..efa3f1d08 100755 --- a/test/apps/ktorrent.exp +++ b/test/apps/ktorrent.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/midori.exp b/test/apps/midori.exp index 1c6ac59a2..431b43f8d 100755 --- a/test/apps/midori.exp +++ b/test/apps/midori.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 5 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/opera.exp b/test/apps/opera.exp index 40520f9f5..b0d1f3b9d 100755 --- a/test/apps/opera.exp +++ b/test/apps/opera.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 10 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/qbittorrent.exp b/test/apps/qbittorrent.exp index 32d35997b..842e47986 100755 --- a/test/apps/qbittorrent.exp +++ b/test/apps/qbittorrent.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/thunderbird.exp b/test/apps/thunderbird.exp index ba7b3abee..2b93835b6 100755 --- a/test/apps/thunderbird.exp +++ b/test/apps/thunderbird.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 5 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/transmission-qt.exp b/test/apps/transmission-qt.exp index 18bd6c469..90b0ef4ac 100755 --- a/test/apps/transmission-qt.exp +++ b/test/apps/transmission-qt.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/uget-gtk.exp b/test/apps/uget-gtk.exp index 6ba56d193..21b859ee2 100755 --- a/test/apps/uget-gtk.exp +++ b/test/apps/uget-gtk.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/vlc.exp b/test/apps/vlc.exp index 6114c2ee4..a0aed9cc9 100755 --- a/test/apps/vlc.exp +++ b/test/apps/vlc.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 diff --git a/test/apps/wine.exp b/test/apps/wine.exp index 58f2adcb6..e2a08089f 100755 --- a/test/apps/wine.exp +++ b/test/apps/wine.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } expect { timeout {puts "TESTING ERROR 2\n";exit} diff --git a/test/apps/xchat.exp b/test/apps/xchat.exp index f5e0b545b..ca17f44e4 100755 --- a/test/apps/xchat.exp +++ b/test/apps/xchat.exp @@ -14,7 +14,7 @@ expect { } expect { timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 3 @@ -41,7 +41,7 @@ expect { send -- "firejail --name=blablabla\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "Child process initialized" + -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" } sleep 2 -- cgit v1.2.3-70-g09d2