diff options
Diffstat (limited to 'test/seccomp-extra/mrwx.exp')
-rwxr-xr-x | test/seccomp-extra/mrwx.exp | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/test/seccomp-extra/mrwx.exp b/test/seccomp-extra/mrwx.exp new file mode 100755 index 000000000..403bc852f --- /dev/null +++ b/test/seccomp-extra/mrwx.exp | |||
@@ -0,0 +1,37 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | |||
11 | |||
12 | # memory-deny-write-execute | ||
13 | send -- "firejail --debug --memory-deny-write-execute pwd\r" | ||
14 | expect { | ||
15 | timeout {puts "TESTING ERROR 1\n";exit} | ||
16 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
17 | } | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | "Installing /run/firejail/mnt/seccomp/seccomp.mdwx seccomp filter" | ||
21 | } | ||
22 | after 500 | ||
23 | |||
24 | send -- "firejail --debug --profile=mrwx.profile pwd\r" | ||
25 | expect { | ||
26 | timeout {puts "TESTING ERROR 3\n";exit} | ||
27 | -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" | ||
28 | } | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 4\n";exit} | ||
31 | "Installing /run/firejail/mnt/seccomp/seccomp.mdwx seccomp filter" | ||
32 | } | ||
33 | after 500 | ||
34 | |||
35 | |||
36 | after 500 | ||
37 | puts "all done\n" | ||