aboutsummaryrefslogtreecommitdiffstats
path: root/test/private-etc/etc-cleanup.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/private-etc/etc-cleanup.exp')
-rwxr-xr-xtest/private-etc/etc-cleanup.exp33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/private-etc/etc-cleanup.exp b/test/private-etc/etc-cleanup.exp
new file mode 100755
index 000000000..eb7eedcf4
--- /dev/null
+++ b/test/private-etc/etc-cleanup.exp
@@ -0,0 +1,33 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2022 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "/usr/lib/firejail/etc-cleanup p1.profile\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 "old: private-etc passwd,group,resolv.conf,X11"
14}
15expect {
16 timeout {puts "TESTING ERROR 2\n";exit}
17 "new: private-etc @x11"
18}
19after 500
20
21send -- "/usr/lib/firejail/etc-cleanup p3.profile\r"
22expect {
23 timeout {puts "TESTING ERROR 3\n";exit}
24 "old: private-etc @tls-ca,os-release,@x11,mime.types,mailcap"
25}
26expect {
27 timeout {puts "TESTING ERROR 4\n";exit}
28 "new: private-etc @tls-ca,@x11,mailcap,mime.types,os-release"
29}
30after 500
31
32
33puts "\nall done\n"