From 7be7e2d326540135273b221f594cd22057ac04dc Mon Sep 17 00:00:00 2001 From: smitsohu Date: Thu, 26 Sep 2019 01:22:59 +0200 Subject: testing: rename and simplify cf. previous commits 5bb476f74efb4754b6f5f8d711c6b77898ef9385 and 4b1a6094d7f4d9c25ff4f0f9a31bcd83732910a1 --- test/fs/whitelist-readonly.exp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 test/fs/whitelist-readonly.exp (limited to 'test/fs/whitelist-readonly.exp') diff --git a/test/fs/whitelist-readonly.exp b/test/fs/whitelist-readonly.exp new file mode 100755 index 000000000..784fc36bd --- /dev/null +++ b/test/fs/whitelist-readonly.exp @@ -0,0 +1,28 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2019 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + + +send -- "firejail --noprofile --whitelist=~/_firejail_test_dir --read-only=~\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "echo mytest > ~/_firejail_test_dir/a\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Read-only file system" +} +after 100 + +send -- "exit\r" +sleep 1 + +puts "\nall done\n" -- cgit v1.2.3-70-g09d2