From b9888e6a388b7d2c17f0aa75b2ef5205b4b90720 Mon Sep 17 00:00:00 2001 From: smitsohu Date: Thu, 26 Sep 2019 10:59:26 +0200 Subject: testing --- test/fs/noblacklist-blacklist-readonly.exp | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 test/fs/noblacklist-blacklist-readonly.exp (limited to 'test/fs/noblacklist-blacklist-readonly.exp') diff --git a/test/fs/noblacklist-blacklist-readonly.exp b/test/fs/noblacklist-blacklist-readonly.exp new file mode 100755 index 000000000..c31bd6948 --- /dev/null +++ b/test/fs/noblacklist-blacklist-readonly.exp @@ -0,0 +1,35 @@ +#!/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 --noblacklist=~ --blacklist=~ --read-only=~\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls ~\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Downloads" +} +after 100 + +send -- "echo World > ~/Hello\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Read-only file system" +} +after 100 + +send -- "exit\r" +sleep 1 + +puts "\nall done\n" -- cgit v1.2.3-70-g09d2