aboutsummaryrefslogtreecommitdiffstats
path: root/test/profiles/profile_comment.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/profiles/profile_comment.exp')
-rwxr-xr-xtest/profiles/profile_comment.exp52
1 files changed, 52 insertions, 0 deletions
diff --git a/test/profiles/profile_comment.exp b/test/profiles/profile_comment.exp
new file mode 100755
index 000000000..a2be510c1
--- /dev/null
+++ b/test/profiles/profile_comment.exp
@@ -0,0 +1,52 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2021 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "rm -fr /tmp/firejailtest*\r"
11send -- "rm -fr /tmp/firejail-strace*\r"
12send -- "rm -fr /tmp/firejail-trace*\r"
13sleep 1
14
15send -- "firejail --profile=comment.profile /usr/bin/true\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized"
19}
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 "Parent is shutting down"
23}
24sleep 2
25
26send -- "firejail --build=/tmp/firejailtest.profile /usr/bin/true\r"
27sleep 1
28
29send -- "cat /tmp/firejailtest.profile\r"
30expect {
31 timeout {puts "TESTING ERROR 2\n";exit}
32 "seccomp"
33}
34after 100
35
36send -- "firejail --profile=/tmp/firejailtest.profile /usr/bin/true\r"
37expect {
38 timeout {puts "TESTING ERROR 3\n";exit}
39 "Child process initialized"
40}
41expect {
42 timeout {puts "TESTING ERROR 4\n";exit}
43 "Parent is shutting down"
44}
45after 100
46
47send -- "rm -fr /tmp/firejailtest*\r"
48send -- "rm -fr /tmp/firejail-strace*\r"
49send -- "rm -fr /tmp/firejail-trace*\r"
50after 100
51
52puts "\nall done\n"