aboutsummaryrefslogtreecommitdiffstats
path: root/test/features/3.5.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/features/3.5.exp')
-rwxr-xr-xtest/features/3.5.exp77
1 files changed, 77 insertions, 0 deletions
diff --git a/test/features/3.5.exp b/test/features/3.5.exp
new file mode 100755
index 000000000..d190ef36f
--- /dev/null
+++ b/test/features/3.5.exp
@@ -0,0 +1,77 @@
1#!/usr/bin/expect -f
2#
3# private-dev
4#
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9set overlay [lindex $argv 0]
10set chroot [lindex $argv 1]
11
12#
13# N
14#
15send -- "firejail --noprofile --private-dev\r"
16expect {
17 timeout {puts "TESTING ERROR 0\n";exit}
18 "Child process initialized"
19}
20sleep 1
21
22send -- "ls -al /dev | wc -l\r"
23expect {
24 timeout {puts "TESTING ERROR 1.1\n";exit}
25 "14"
26}
27
28after 100
29send -- "exit\r"
30sleep 1
31
32#
33# O
34#
35if { $overlay == "overlay" } {
36 send -- "firejail --noprofile --overlay --private-dev\r"
37 expect {
38 timeout {puts "TESTING ERROR 2\n";exit}
39 "Child process initialized"
40 }
41 sleep 1
42
43 send -- "ls -al /dev | wc -l\r"
44 expect {
45 timeout {puts "TESTING ERROR 3.1\n";exit}
46 "13"
47 }
48
49 after 100
50 send -- "exit\r"
51 sleep 1
52}
53
54#
55# C
56#
57if { $chroot == "chroot" } {
58 send -- "firejail --noprofile --chroot=/tmp/chroot --private-dev\r"
59 expect {
60 timeout {puts "TESTING ERROR 4\n";exit}
61 "Child process initialized"
62 }
63 sleep 1
64
65 send -- "ls -al /dev | wc -l\r"
66 expect {
67 timeout {puts "TESTING ERROR 5.1\n";exit}
68 "13"
69 }
70
71 after 100
72 send -- "exit\r"
73 sleep 1
74}
75
76
77puts "\nall done\n"