From 051e84a0068a503a4531712ab7f882240b003b15 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Thu, 28 Apr 2016 20:47:36 -0400 Subject: removed pwd from test/utils --- test/utils/join-profile.exp | 26 +++++++++++--------------- test/utils/join.exp | 25 ++++++++++--------------- test/utils/join2.exp | 25 ++++++++++--------------- test/utils/join3.exp | 25 ++++++++++--------------- test/utils/shutdown.exp | 15 ++++++++------- 5 files changed, 49 insertions(+), 67 deletions(-) diff --git a/test/utils/join-profile.exp b/test/utils/join-profile.exp index 9200980a1..a4262b999 100755 --- a/test/utils/join-profile.exp +++ b/test/utils/join-profile.exp @@ -4,36 +4,32 @@ set timeout 10 spawn $env(SHELL) match_max 100000 + send -- "firejail --profile=name.profile\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 3 +sleep 2 spawn $env(SHELL) -send -- "firejail --join=jointesting;pwd\r" +send -- "firejail --join=jointesting\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Switching to pid" } -sleep 3 - - -spawn $env(SHELL) -send -- "firejail --shutdown=jointesting;pwd\r" +sleep 1 +send -- "ps aux\r" expect { - timeout {puts "TESTING ERROR 3\n";exit} - "home" + timeout {puts "TESTING ERROR 2\n";exit} + "/bin/bash" } -sleep 5 - -send -- "firejail --list;pwd\r" expect { - timeout {puts "TESTING ERROR 4\n";exit} - "jointesting" {puts "TESTING ERROR 5\n";exit} - "home" + timeout {puts "TESTING ERROR 3\n";exit} + "/bin/bash" } + +send -- "exit" sleep 1 puts "\nall done\n" diff --git a/test/utils/join.exp b/test/utils/join.exp index e1cd37fcb..ab4917f7d 100755 --- a/test/utils/join.exp +++ b/test/utils/join.exp @@ -8,36 +8,31 @@ cd /home spawn $env(SHELL) match_max 100000 -send -- "firejail --name=svntesting\r" +send -- "firejail --name=jointesting\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 3 +sleep 2 spawn $env(SHELL) -send -- "firejail --join=svntesting;pwd\r" +send -- "firejail --join=jointesting\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Switching to pid" } sleep 1 - - -spawn $env(SHELL) -send -- "firejail --shutdown=svntesting;pwd\r" +send -- "ps aux\r" expect { - timeout {puts "TESTING ERROR 3\n";exit} - "home" + timeout {puts "TESTING ERROR 2\n";exit} + "/bin/bash" } -sleep 1 - -send -- "firejail --list;pwd\r" expect { - timeout {puts "TESTING ERROR 4\n";exit} - "svntesting" {puts "TESTING ERROR 5\n";exit} - "home" + timeout {puts "TESTING ERROR 3\n";exit} + "/bin/bash" } + +send -- "exit" sleep 1 puts "\nall done\n" diff --git a/test/utils/join2.exp b/test/utils/join2.exp index 820c43174..82540fe39 100755 --- a/test/utils/join2.exp +++ b/test/utils/join2.exp @@ -8,36 +8,31 @@ cd /home spawn $env(SHELL) match_max 100000 -send -- "firejail --name=\"svn testing\"\r" +send -- "firejail --name=\"join testing\"\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 3 +sleep 2 spawn $env(SHELL) -send -- "firejail --join=\"svn testing\";pwd\r" +send -- "firejail --join=\"join testing\"\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Switching to pid" } sleep 1 - - -spawn $env(SHELL) -send -- "firejail --shutdown=\"svn testing\";pwd\r" +send -- "ps aux\r" expect { - timeout {puts "TESTING ERROR 3\n";exit} - "home" + timeout {puts "TESTING ERROR 2\n";exit} + "/bin/bash" } -sleep 1 - -send -- "firejail --list;pwd\r" expect { - timeout {puts "TESTING ERROR 4\n";exit} - "svn testing" {puts "TESTING ERROR 5\n";exit} - "home" + timeout {puts "TESTING ERROR 3\n";exit} + "/bin/bash" } + +send -- "exit" sleep 1 puts "\nall done\n" diff --git a/test/utils/join3.exp b/test/utils/join3.exp index 96d3e5186..e92045dd1 100755 --- a/test/utils/join3.exp +++ b/test/utils/join3.exp @@ -8,36 +8,31 @@ cd /home spawn $env(SHELL) match_max 100000 -send -- "firejail --name=svn\\ testing\r" +send -- "firejail --name=join\\ testing\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 3 +sleep 2 spawn $env(SHELL) -send -- "firejail --join=svn\\ testing;pwd\r" +send -- "firejail --join=join\\ testing\r" expect { timeout {puts "TESTING ERROR 1\n";exit} "Switching to pid" } sleep 1 - - -spawn $env(SHELL) -send -- "firejail --shutdown=svn\\ testing;pwd\r" +send -- "ps aux\r" expect { - timeout {puts "TESTING ERROR 3\n";exit} - "home" + timeout {puts "TESTING ERROR 2\n";exit} + "/bin/bash" } -sleep 1 - -send -- "firejail --list;pwd\r" expect { - timeout {puts "TESTING ERROR 4\n";exit} - "svn testing" {puts "TESTING ERROR 5\n";exit} - "home" + timeout {puts "TESTING ERROR 3\n";exit} + "/bin/bash" } + +send -- "exit" sleep 1 puts "\nall done\n" diff --git a/test/utils/shutdown.exp b/test/utils/shutdown.exp index ca321b3c9..15a9a62c8 100755 --- a/test/utils/shutdown.exp +++ b/test/utils/shutdown.exp @@ -13,22 +13,23 @@ expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } -sleep 3 +sleep 2 spawn $env(SHELL) -send -- "firejail --shutdown=shutdowntesting;pwd\r" +send -- "firejail --shutdown=shutdowntesting; echo done\r" expect { timeout {puts "TESTING ERROR 4\n";exit} - "home" + "done" } -sleep 1 +sleep 5 -send -- "firejail --list;pwd\r" +spawn $env(SHELL) +send -- "firejail --list;echo done\r" expect { timeout {puts "TESTING ERROR 5\n";exit} "shutdowntesting" {puts "TESTING ERROR 6\n";exit} - "home" + "done" } sleep 1 -puts "\nalldone\n" +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf