From a8d758ba9e7314de9208e4b7d4a5307d1b4fefd0 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 22 Nov 2015 13:15:13 -0500 Subject: feature test --- test/features/1.8.exp | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 test/features/1.8.exp (limited to 'test/features/1.8.exp') diff --git a/test/features/1.8.exp b/test/features/1.8.exp new file mode 100755 index 000000000..514dd3b81 --- /dev/null +++ b/test/features/1.8.exp @@ -0,0 +1,71 @@ +#!/usr/bin/expect -f +# +# disable /etc/firejail and ~/.config/firejail +# + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +# +# N +# +send -- "touch /var/tmp/somefile\r" +sleep 1 +send -- "firejail --noprofile\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -l /var/tmp/somefile | wc -l\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "0" +} +after 100 +send -- "exit\r" +sleep 1 + + +# +# O +# +send -- "firejail --noprofile --overlay\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -l /var/tmp/somefile | wc -l\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "0" +} +after 100 +send -- "exit\r" +sleep 1 + +# +# C +# +send -- "firejail --noprofile --chroot=/tmp/chroot\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "Child process initialized" +} +sleep 1 + +send -- "ls -l /var/tmp/somefile | wc -l\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "0" +} +after 100 +send -- "exit\r" +sleep 1 + + +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf