diff options
author | 2023-02-06 22:28:25 -0500 | |
---|---|---|
committer | 2023-02-06 22:28:25 -0500 | |
commit | cb1104edf9c6ed0dc753724259b5c12fa5619afb (patch) | |
tree | d654d6547a7836faf5467cb37dac9f3ab50f7107 /test/private-etc/etc-cleanup.exp | |
parent | testing (diff) | |
download | firejail-cb1104edf9c6ed0dc753724259b5c12fa5619afb.tar.gz firejail-cb1104edf9c6ed0dc753724259b5c12fa5619afb.tar.zst firejail-cb1104edf9c6ed0dc753724259b5c12fa5619afb.zip |
private-etc testing
Diffstat (limited to 'test/private-etc/etc-cleanup.exp')
-rwxr-xr-x | test/private-etc/etc-cleanup.exp | 33 |
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "/usr/lib/firejail/etc-cleanup p1.profile\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "old: private-etc passwd,group,resolv.conf,X11" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 2\n";exit} | ||
17 | "new: private-etc @x11" | ||
18 | } | ||
19 | after 500 | ||
20 | |||
21 | send -- "/usr/lib/firejail/etc-cleanup p3.profile\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 3\n";exit} | ||
24 | "old: private-etc @tls-ca,os-release,@x11,mime.types,mailcap" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 4\n";exit} | ||
28 | "new: private-etc @tls-ca,@x11,mailcap,mime.types,os-release" | ||
29 | } | ||
30 | after 500 | ||
31 | |||
32 | |||
33 | puts "\nall done\n" | ||