From d0664e2db83ce2c4815dcdb6f84d957a9a880673 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 30 Oct 2017 08:42:01 -0400 Subject: testing --- test/fs/fs_dev_shm.exp | 9 +++++---- test/fs/fs_var_lock.exp | 8 +++++--- test/fs/fs_var_tmp.exp | 8 +++++--- test/fs/option_blacklist.exp | 3 ++- test/fs/private-lib.exp | 11 +++++++---- 5 files changed, 24 insertions(+), 15 deletions(-) (limited to 'test/fs') diff --git a/test/fs/fs_dev_shm.exp b/test/fs/fs_dev_shm.exp index 1d810084c..405d32396 100755 --- a/test/fs/fs_dev_shm.exp +++ b/test/fs/fs_dev_shm.exp @@ -13,7 +13,8 @@ expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 1 +after 100 +send -- "stty -echo\r" send -- "echo mytest > /dev/shm/ttt;echo done\r" expect { @@ -43,8 +44,7 @@ expect { "mytest" {puts "TESTING ERROR 6\n";exit} "done" } - -sleep 1 +after 100 send -- "exit\r" sleep 1 @@ -54,7 +54,8 @@ expect { timeout {puts "TESTING ERROR 7\n";exit} "Child process initialized" } -sleep 1 +after 100 +send -- "stty -echo\r" send -- "echo mytest > /dev/shm/ttt;echo done\r" expect { diff --git a/test/fs/fs_var_lock.exp b/test/fs/fs_var_lock.exp index 919b75f34..63893b855 100755 --- a/test/fs/fs_var_lock.exp +++ b/test/fs/fs_var_lock.exp @@ -13,7 +13,8 @@ expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 1 +after 100 +send -- "stty -echo\r" send -- "echo mytest > /var/lock/ttt;echo done\r" expect { @@ -44,7 +45,7 @@ expect { "done" } -sleep 1 +after 100 send -- "exit\r" sleep 1 @@ -54,7 +55,8 @@ expect { timeout {puts "TESTING ERROR 7\n";exit} "Child process initialized" } -sleep 1 +after 100 +send -- "stty -echo\r" send -- "echo mytest > /var/lock/ttt;echo done\r" expect { diff --git a/test/fs/fs_var_tmp.exp b/test/fs/fs_var_tmp.exp index 50679db6d..d95bf3337 100755 --- a/test/fs/fs_var_tmp.exp +++ b/test/fs/fs_var_tmp.exp @@ -13,7 +13,8 @@ expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 1 +after 100 +send -- "stty -echo\r" send -- "echo mytest > /var/tmp/ttt;echo done\r" expect { @@ -44,7 +45,7 @@ expect { "done" } -sleep 1 +after 100 send -- "exit\r" sleep 1 @@ -54,7 +55,8 @@ expect { timeout {puts "TESTING ERROR 7\n";exit} "Child process initialized" } -sleep 1 +after 100 +send -- "stty -echo\r" send -- "echo mytest > /var/tmp/ttt;echo done\r" expect { diff --git a/test/fs/option_blacklist.exp b/test/fs/option_blacklist.exp index bf2a57999..317651566 100755 --- a/test/fs/option_blacklist.exp +++ b/test/fs/option_blacklist.exp @@ -12,7 +12,8 @@ expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 1 +after 100 +send -- "stty -echo\r" send -- "ls -l /var;echo done\r" expect { diff --git a/test/fs/private-lib.exp b/test/fs/private-lib.exp index fd127bdb3..20d480062 100755 --- a/test/fs/private-lib.exp +++ b/test/fs/private-lib.exp @@ -3,27 +3,30 @@ # Copyright (C) 2014-2017 Firejail Authors # License GPL v2 + set timeout 10 spawn $env(SHELL) match_max 100000 -send -- "firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo \r" +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" } after 100 +send -- "stty -echo\r" -send -- "cd /bin; find .; echo done\r" +send -- "cd /bin; find .\; echo done\r" expect { timeout {puts "TESTING ERROR 2\n";exit} +# "grep" {puts "TESTING ERROR 3\n";exit} "rm" {puts "TESTING ERROR 3\n";exit} "cp" {puts "TESTING ERROR 4\n";exit} "done" } after 100 -send -- "cd /lib; find .; echo done\r" +send -- "cd /lib; find .\r" expect { timeout {puts "TESTING ERROR 5\n";exit} "modules" {puts "TESTING ERROR 6\n";exit} @@ -32,7 +35,7 @@ expect { } after 100 -send -- "cd /usr/lib; find .; echo done\r" +send -- "cd /usr/lib; find .\r" expect { timeout {puts "TESTING ERROR 8\n";exit} "grub" {puts "TESTING ERROR 9\n";exit} -- cgit v1.2.3-54-g00ecf