From 13ef7fba2bdf48319f68a7362779c41edae19651 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 20 Nov 2016 21:23:10 -0500 Subject: testing --- test/fs/whitelist-downloads.exp | 49 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100755 test/fs/whitelist-downloads.exp (limited to 'test/fs/whitelist-downloads.exp') diff --git a/test/fs/whitelist-downloads.exp b/test/fs/whitelist-downloads.exp new file mode 100755 index 000000000..6af318d2b --- /dev/null +++ b/test/fs/whitelist-downloads.exp @@ -0,0 +1,49 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2016 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "cp user-dirs.dirs /tmp/.\r" +after 100 + +send -- "firejail --private --noprofile\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +after 100 + +send -- "firejail --force --profile=/etc/firejail/firefox.profile\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "cannot whitelist Downloads directory" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Child process initialized" +} +after 100 + +send -- "exit\r" +after 100 + +send -- "cp /tmp/user-dirs.dirs ~/.config/.\r" +after 100 + +send -- "firejail --force --profile=/etc/firejail/firefox.profile\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "cannot whitelist Downloads directory" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +after 100 + +puts "\nall done\n" + -- cgit v1.2.3-54-g00ecf