From 0df2fd2efce584ff9430cb2e523136b75df92c20 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 24 Nov 2015 11:47:38 -0500 Subject: feature testing --- test/features/3.4.exp | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 test/features/3.4.exp (limited to 'test/features/3.4.exp') diff --git a/test/features/3.4.exp b/test/features/3.4.exp new file mode 100755 index 000000000..bc6e10733 --- /dev/null +++ b/test/features/3.4.exp @@ -0,0 +1,69 @@ +#!/usr/bin/expect -f +# +# whitelist +# + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +# +# N +# +send -- "firejail --noprofile --whitelist=/home/netblue/.config\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -al ~/. | wc -l\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "6" +} +after 100 +send -- "exit\r" +sleep 1 + + +# +# O +# +send -- "firejail --noprofile --overlay --whitelist=/home/netblue/.config\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -al ~/. | wc -l\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "6" +} +after 100 +send -- "exit\r" +sleep 1 + +# +# C +# +send -- "firejail --noprofile --chroot=/tmp/chroot --whitelist=/home/netblue/.config\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -al ~/. | wc -l\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "6" +} +after 100 +send -- "exit\r" +sleep 1 + + +puts "\nall done\n" -- cgit v1.2.3-70-g09d2