From 3fe1b06a36cefc497e957b603d1a5231ba7fbc02 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 20 Apr 2018 09:28:42 -0400 Subject: cleanup --- test/environment/csh.exp | 34 ++++++++-------------------------- test/environment/zsh.exp | 30 ++++++------------------------ 2 files changed, 14 insertions(+), 50 deletions(-) (limited to 'test/environment') diff --git a/test/environment/csh.exp b/test/environment/csh.exp index 10a278ebc..7b5ab9b33 100755 --- a/test/environment/csh.exp +++ b/test/environment/csh.exp @@ -1,49 +1,31 @@ #!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2018 Firejail Authors -# License GPL v2 set timeout 10 +cd /home spawn $env(SHELL) match_max 100000 -send -- "firejail --private --tracelog --csh\r" +send -- "firejail --private --shell=/bin/csh\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } sleep 1 -send -- "find ~\r" +send -- "env | grep SHELL;pwd\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - ".cshrc" -} - -send -- "env | grep SHELL\r" -expect { - timeout {puts "TESTING ERROR 2\n";exit} - "SHELL" + "SHELL" } expect { - timeout {puts "TESTING ERROR 2.1\n";exit} + timeout {puts "TESTING ERROR 2\n";exit} "/bin/csh" } -send -- "exit\r" -sleep 1 - -send -- "firejail --shell=none --csh\r" expect { timeout {puts "TESTING ERROR 3\n";exit} - "shell=none was already specified" -} -after 100 - -send -- "firejail --csh --shell=none\r" -expect { - timeout {puts "TESTING ERROR 4\n";exit} - "a shell was already specified" + "home" } +send -- "exit\r" after 100 -puts "\n" +puts "\nall done\n" diff --git a/test/environment/zsh.exp b/test/environment/zsh.exp index e7f610e98..a1b94a326 100755 --- a/test/environment/zsh.exp +++ b/test/environment/zsh.exp @@ -1,49 +1,31 @@ #!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2018 Firejail Authors -# License GPL v2 set timeout 10 +cd /home spawn $env(SHELL) match_max 100000 -send -- "firejail --private --tracelog --zsh\r" +send -- "firejail --private --shell=/bin/zsh\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } sleep 1 -send -- "find ~\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - ".zshrc" -} - send -- "env | grep SHELL;pwd\r" expect { - timeout {puts "TESTING ERROR 2\n";exit} + timeout {puts "TESTING ERROR 1\n";exit} "SHELL" } expect { - timeout {puts "TESTING ERROR 2.1\n";exit} + timeout {puts "TESTING ERROR 2\n";exit} "/bin/zsh" } -send -- "exit\r" -sleep 1 - -send -- "firejail --shell=none --zsh\r" expect { timeout {puts "TESTING ERROR 3\n";exit} - "shell=none was already specified" -} -after 100 - -send -- "firejail --zsh --shell=none\r" -expect { - timeout {puts "TESTING ERROR 4\n";exit} - "a shell was already specified" + "home" } +send -- "exit\r" after 100 puts "\nall done\n" -- cgit v1.2.3-54-g00ecf