aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2015-12-17 12:09:42 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2015-12-17 12:09:42 -0500
commit2da675a42183f2c9fa7f652f31799e1a41ed5ee4 (patch)
tree7b37b02cec7ce12e091f8d36bf6499ef00e142bb /test
parentadd support for sandbox name in profile files (diff)
downloadfirejail-2da675a42183f2c9fa7f652f31799e1a41ed5ee4.tar.gz
firejail-2da675a42183f2c9fa7f652f31799e1a41ed5ee4.tar.zst
firejail-2da675a42183f2c9fa7f652f31799e1a41ed5ee4.zip
testing
Diffstat (limited to 'test')
-rw-r--r--test/name.profile1
-rwxr-xr-xtest/option-join-profile.exp39
-rwxr-xr-xtest/test.sh3
3 files changed, 43 insertions, 0 deletions
diff --git a/test/name.profile b/test/name.profile
new file mode 100644
index 000000000..69e605600
--- /dev/null
+++ b/test/name.profile
@@ -0,0 +1 @@
name svntesting
diff --git a/test/option-join-profile.exp b/test/option-join-profile.exp
new file mode 100755
index 000000000..d208a7f23
--- /dev/null
+++ b/test/option-join-profile.exp
@@ -0,0 +1,39 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail --profile=name.profile\r"
8expect {
9 timeout {puts "TESTING ERROR 0\n";exit}
10 "Child process initialized"
11}
12sleep 3
13
14spawn $env(SHELL)
15send -- "firejail --join=svntesting;pwd\r"
16expect {
17 timeout {puts "TESTING ERROR 1\n";exit}
18 "Switching to pid"
19}
20sleep 1
21
22
23spawn $env(SHELL)
24send -- "firejail --shutdown=svntesting;pwd\r"
25expect {
26 timeout {puts "TESTING ERROR 3\n";exit}
27 "home"
28}
29sleep 1
30
31send -- "firejail --list;pwd\r"
32expect {
33 timeout {puts "TESTING ERROR 4\n";exit}
34 "svntesting" {puts "TESTING ERROR 5\n";exit}
35 "home"
36}
37sleep 1
38
39puts "\nall done\n"
diff --git a/test/test.sh b/test/test.sh
index 86ae874d9..78fc7b974 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -95,6 +95,9 @@ echo "TESTING: shutdown"
95echo "TESTING: join" 95echo "TESTING: join"
96./option-join.exp 96./option-join.exp
97 97
98echo "TESTING: join profile"
99./option-join-profile.exp
100
98echo "TESTING: firejail in firejail" 101echo "TESTING: firejail in firejail"
99./firejail-in-firejail.exp 102./firejail-in-firejail.exp
100 103