aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2020-09-12 07:56:25 -0400
committerLibravatar netblue30 <netblue30@yahoo.com>2020-09-12 07:56:25 -0400
commit2c55e7f15219504ea70a12274618e5ba8e5c35da (patch)
tree8620792122a9401ee4d33112e7707aeb1e94dcd5 /test
parentadd --include (#3571) (diff)
downloadfirejail-2c55e7f15219504ea70a12274618e5ba8e5c35da.tar.gz
firejail-2c55e7f15219504ea70a12274618e5ba8e5c35da.tar.zst
firejail-2c55e7f15219504ea70a12274618e5ba8e5c35da.zip
some dbus tests
Diffstat (limited to 'test')
-rwxr-xr-xtest/utils/join5.exp46
-rw-r--r--test/utils/join5.profile4
-rwxr-xr-xtest/utils/utils.sh5
3 files changed, 54 insertions, 1 deletions
diff --git a/test/utils/join5.exp b/test/utils/join5.exp
new file mode 100755
index 000000000..43ca09b4d
--- /dev/null
+++ b/test/utils/join5.exp
@@ -0,0 +1,46 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2020 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test123 --profile=join5.profile\r"
11expect {
12 timeout {puts "TESTING ERROR 5\n";exit}
13 "Child process initialized"
14}
15sleep 1
16spawn $env(SHELL)
17send -- "firejail --join=test123\r"
18expect {
19 timeout {puts "TESTING ERROR 1\n";exit}
20 "Switching to pid"
21}
22sleep 1
23send -- "ps aux\r"
24expect {
25 timeout {puts "TESTING ERROR 2\n";exit}
26 "/bin/bash"
27}
28expect {
29 timeout {puts "TESTING ERROR 3\n";exit}
30 "/bin/bash"
31}
32
33send -- "exit\r"
34after 100
35
36send -- "firejail --protocol.print=test123\r"
37expect {
38 timeout {puts "TESTING ERROR 4\n";exit}
39 "Switching to pid"
40}
41expect {
42 timeout {puts "TESTING ERROR 5\n";exit}
43 "unix"
44}
45
46puts "\nall done\n"
diff --git a/test/utils/join5.profile b/test/utils/join5.profile
new file mode 100644
index 000000000..e9eb37a4f
--- /dev/null
+++ b/test/utils/join5.profile
@@ -0,0 +1,4 @@
1dbus-user filter
2dbus-system none
3seccomp
4protocol unix
diff --git a/test/utils/utils.sh b/test/utils/utils.sh
index 48a8051fa..7e8426f35 100755
--- a/test/utils/utils.sh
+++ b/test/utils/utils.sh
@@ -99,9 +99,12 @@ echo "TESTING: join2 (test/utils/join2.exp)"
99echo "TESTING: join3 (test/utils/join3.exp)" 99echo "TESTING: join3 (test/utils/join3.exp)"
100./join3.exp 100./join3.exp
101 101
102echo "TESTING: join3 (test/utils/join4.exp)" 102echo "TESTING: join4 (test/utils/join4.exp)"
103./join4.exp 103./join4.exp
104 104
105echo "TESTING: join5 (test/utils/join5.exp)"
106./join5.exp
107
105echo "TESTING: join profile (test/utils/join-profile.exp)" 108echo "TESTING: join profile (test/utils/join-profile.exp)"
106./join-profile.exp 109./join-profile.exp
107 110