From bd5f96b1f000d995a712926f3e02aa11a0fb1679 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 21 Feb 2016 08:46:37 -0500 Subject: testing --- test/option-join2.exp | 39 +++++++++++++++++++++++++++++++++++++++ test/option-join3.exp | 39 +++++++++++++++++++++++++++++++++++++++ test/test.sh | 6 ++++++ 3 files changed, 84 insertions(+) create mode 100755 test/option-join2.exp create mode 100755 test/option-join3.exp (limited to 'test') diff --git a/test/option-join2.exp b/test/option-join2.exp new file mode 100755 index 000000000..630b62d9e --- /dev/null +++ b/test/option-join2.exp @@ -0,0 +1,39 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --name=\"svn testing\"\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 3 + +spawn $env(SHELL) +send -- "firejail --join=\"svn testing\";pwd\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Switching to pid" +} +sleep 1 + + +spawn $env(SHELL) +send -- "firejail --shutdown=\"svn testing\";pwd\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "home" +} +sleep 1 + +send -- "firejail --list;pwd\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "svn testing" {puts "TESTING ERROR 5\n";exit} + "home" +} +sleep 1 + +puts "\nall done\n" diff --git a/test/option-join3.exp b/test/option-join3.exp new file mode 100755 index 000000000..aa8a445df --- /dev/null +++ b/test/option-join3.exp @@ -0,0 +1,39 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --name=svn\\ testing\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 3 + +spawn $env(SHELL) +send -- "firejail --join=svn\\ testing;pwd\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Switching to pid" +} +sleep 1 + + +spawn $env(SHELL) +send -- "firejail --shutdown=svn\\ testing;pwd\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "home" +} +sleep 1 + +send -- "firejail --list;pwd\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "svn testing" {puts "TESTING ERROR 5\n";exit} + "home" +} +sleep 1 + +puts "\nall done\n" diff --git a/test/test.sh b/test/test.sh index 93e38edfb..ddb8431c8 100755 --- a/test/test.sh +++ b/test/test.sh @@ -105,6 +105,12 @@ echo "TESTING: shutdown (option_shutdown.exp)" echo "TESTING: join (opton-join.exp)" ./option-join.exp +echo "TESTING: join2 (opton-join2.exp)" +./option-join2.exp + +echo "TESTING: join3 (opton-join3.exp)" +./option-join3.exp + echo "TESTING: join profile (option-join-profile.exp)" ./option-join-profile.exp -- cgit v1.2.3-54-g00ecf