From 495f1c5cdaeeadafcf150080545ae4848dc633ca Mon Sep 17 00:00:00 2001 From: netblue30 Date: Mon, 21 Aug 2017 08:51:08 -0400 Subject: testing --- test/filters/memwrexe-32.exp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 test/filters/memwrexe-32.exp (limited to 'test/filters/memwrexe-32.exp') 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 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2017 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --memory-deny-write-execute ./memwrexe-32 mmap\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "mmap successful" {puts "TESTING ERROR 2\n";exit} + "Parent is shutting down" +} +after 100 + +send -- "firejail --memory-deny-write-execute ./memwrexe-32 mprotect\r" +expect { + timeout {puts "TESTING ERROR 10\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 11\n";exit} + "mprotect successful" {puts "TESTING ERROR 12\n";exit} + "Parent is shutting down" +} + +after 100 +puts "\nall done\n" -- cgit v1.2.3-70-g09d2