diff options
Diffstat (limited to 'test/filters/memwrexe-32.exp')
-rwxr-xr-x | test/filters/memwrexe-32.exp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/filters/memwrexe-32.exp b/test/filters/memwrexe-32.exp new file mode 100755 index 000000000..af2159973 --- /dev/null +++ b/test/filters/memwrexe-32.exp | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2017 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 mmap\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "mmap successful" {puts "TESTING ERROR 2\n";exit} | ||
18 | "Parent is shutting down" | ||
19 | } | ||
20 | after 100 | ||
21 | |||
22 | send -- "firejail --memory-deny-write-execute ./memwrexe-32 mprotect\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 10\n";exit} | ||
25 | "Child process initialized" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 11\n";exit} | ||
29 | "mprotect successful" {puts "TESTING ERROR 12\n";exit} | ||
30 | "Parent is shutting down" | ||
31 | } | ||
32 | |||
33 | after 100 | ||
34 | puts "\nall done\n" | ||