diff options
author | netblue30 <netblue30@yahoo.com> | 2020-09-12 07:56:25 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2020-09-12 07:56:25 -0400 |
commit | 2c55e7f15219504ea70a12274618e5ba8e5c35da (patch) | |
tree | 8620792122a9401ee4d33112e7707aeb1e94dcd5 | |
parent | add --include (#3571) (diff) | |
download | firejail-2c55e7f15219504ea70a12274618e5ba8e5c35da.tar.gz firejail-2c55e7f15219504ea70a12274618e5ba8e5c35da.tar.zst firejail-2c55e7f15219504ea70a12274618e5ba8e5c35da.zip |
some dbus tests
-rwxr-xr-x | test/utils/join5.exp | 46 | ||||
-rw-r--r-- | test/utils/join5.profile | 4 | ||||
-rwxr-xr-x | test/utils/utils.sh | 5 |
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --name=test123 --profile=join5.profile\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 5\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | spawn $env(SHELL) | ||
17 | send -- "firejail --join=test123\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "Switching to pid" | ||
21 | } | ||
22 | sleep 1 | ||
23 | send -- "ps aux\r" | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 2\n";exit} | ||
26 | "/bin/bash" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 3\n";exit} | ||
30 | "/bin/bash" | ||
31 | } | ||
32 | |||
33 | send -- "exit\r" | ||
34 | after 100 | ||
35 | |||
36 | send -- "firejail --protocol.print=test123\r" | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 4\n";exit} | ||
39 | "Switching to pid" | ||
40 | } | ||
41 | expect { | ||
42 | timeout {puts "TESTING ERROR 5\n";exit} | ||
43 | "unix" | ||
44 | } | ||
45 | |||
46 | puts "\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 @@ | |||
1 | dbus-user filter | ||
2 | dbus-system none | ||
3 | seccomp | ||
4 | protocol 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)" | |||
99 | echo "TESTING: join3 (test/utils/join3.exp)" | 99 | echo "TESTING: join3 (test/utils/join3.exp)" |
100 | ./join3.exp | 100 | ./join3.exp |
101 | 101 | ||
102 | echo "TESTING: join3 (test/utils/join4.exp)" | 102 | echo "TESTING: join4 (test/utils/join4.exp)" |
103 | ./join4.exp | 103 | ./join4.exp |
104 | 104 | ||
105 | echo "TESTING: join5 (test/utils/join5.exp)" | ||
106 | ./join5.exp | ||
107 | |||
105 | echo "TESTING: join profile (test/utils/join-profile.exp)" | 108 | echo "TESTING: join profile (test/utils/join-profile.exp)" |
106 | ./join-profile.exp | 109 | ./join-profile.exp |
107 | 110 | ||