From 173a90129e73e81fa80bb12f6ec19e3943c74ca5 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sun, 7 Aug 2016 18:05:45 +0200 Subject: tar requires shell for executing compressors like bzip2 --- test/sysutils/tar.exp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'test') diff --git a/test/sysutils/tar.exp b/test/sysutils/tar.exp index af569f5ac..f41d67d6f 100755 --- a/test/sysutils/tar.exp +++ b/test/sysutils/tar.exp @@ -9,20 +9,31 @@ match_max 100000 send -- "firejail /bin/tar -cjvf firejail_t2 /usr/share/doc/firejail\r" expect { - timeout {puts "TESTING ERROR 1\n";exit} + timeout {puts "TESTING ERROR 1.1\n";exit} + "Error" {puts "TESTING ERROR 1.2\n";exit} "/usr/share/doc/firejail/README" } after 100 +send -- "stat -c '|%s|' firejail_t2; uname -s\r" +expect { + timeout {puts "TESTING ERROR 2.1\n";exit} + "|0|" {puts "TESTING ERROR 2.2\n";exit} + "Linux" +} +sleep 1 + send -- "firejail /bin/tar --compare --file=firejail_t2 -C / | wc\r" expect { - timeout {puts "TESTING ERROR 2\n";exit} + timeout {puts "TESTING ERROR 3.1\n";exit} + "This does not look like a tar archive" {puts "TESTING ERROR 3.2\n"; exit} " 0 0 0" } sleep 1 send -- "/bin/tar --compare --file=firejail_t2 -C / | wc\r" expect { - timeout {puts "TESTING ERROR 3\n";exit} + timeout {puts "TESTING ERROR 4.1\n";exit} + "This does not look like a tar archive" {puts "TESTING ERROR 4.2\n"; exit} " 0 0 0" } sleep 1 -- cgit v1.2.3-70-g09d2 From 7f31ebff5c7401c16b1b179380ba782ac4934d65 Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sun, 7 Aug 2016 18:06:49 +0200 Subject: Don't assume ~/.bashrc exists --- test/sysutils/file.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') diff --git a/test/sysutils/file.exp b/test/sysutils/file.exp index e40b83197..a8ad84d12 100755 --- a/test/sysutils/file.exp +++ b/test/sysutils/file.exp @@ -7,10 +7,12 @@ set timeout 10 spawn $env(SHELL) match_max 100000 -send -- "firejail file ~/.bashrc\r" +send -- "echo 'test string for firejail test' > /tmp/firejail_test.txt; firejail file /tmp/firejail_test.txt\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "ASCII text" } +send -- "rm /tmp/firejail_test.txt\r" +sleep 1 puts "\nall done\n" -- cgit v1.2.3-70-g09d2