aboutsummaryrefslogtreecommitdiffstats
path: root/test/filters/memwrexe-32.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/filters/memwrexe-32.exp')
-rwxr-xr-xtest/filters/memwrexe-32.exp34
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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --memory-deny-write-execute ./memwrexe-32 mmap\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Child process initialized"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "mmap successful" {puts "TESTING ERROR 2\n";exit}
18 "Parent is shutting down"
19}
20after 100
21
22send -- "firejail --memory-deny-write-execute ./memwrexe-32 mprotect\r"
23expect {
24 timeout {puts "TESTING ERROR 10\n";exit}
25 "Child process initialized"
26}
27expect {
28 timeout {puts "TESTING ERROR 11\n";exit}
29 "mprotect successful" {puts "TESTING ERROR 12\n";exit}
30 "Parent is shutting down"
31}
32
33after 100
34puts "\nall done\n"