From e7486b39795847043cd16c55a1c8142770c77de8 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 2 Feb 2016 08:44:40 -0500 Subject: 0.9.38 testing --- test/features/3.1.exp | 117 +++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 101 insertions(+), 16 deletions(-) (limited to 'test/features/3.1.exp') diff --git a/test/features/3.1.exp b/test/features/3.1.exp index bcac4bf04..52a929651 100755 --- a/test/features/3.1.exp +++ b/test/features/3.1.exp @@ -12,20 +12,49 @@ set chroot [lindex $argv 1] # # N # -send -- "touch ~/.config/firejail-test-file\r" -sleep 1 -send -- "firejail --noprofile --tmpfs=/home/netblue/.config\r" +send -- "firejail --noprofile --private\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } sleep 1 -send -- "ls ~/.config | wc -l\r" +send -- "ls -al | wc -l\r" +expect { + timeout {puts "TESTING ERROR 1.1\n";exit} + "5" +} + +send -- "ls -al .bashrc\r" +expect { + timeout {puts "TESTING ERROR 1.2\n";exit} + "netblue" +} +expect { + timeout {puts "TESTING ERROR 1.3\n";exit} + "netblue" +} +expect { + timeout {puts "TESTING ERROR 1.4\n";exit} + ".bashrc" +} + +send -- "ls -al .Xauthority\r" +expect { + timeout {puts "TESTING ERROR 1.5\n";exit} + "netblue" +} expect { - timeout {puts "TESTING ERROR 1\n";exit} - "0" + timeout {puts "TESTING ERROR 1.6\n";exit} + "netblue" } +expect { + timeout {puts "TESTING ERROR 1.7\n";exit} + ".Xauthority" +} + + + after 100 send -- "exit\r" sleep 1 @@ -34,18 +63,47 @@ sleep 1 # O # if { $overlay == "overlay" } { - send -- "firejail --noprofile --overlay --tmpfs=/home/netblue/.config\r" + send -- "firejail --noprofile --overlay --private\r" expect { timeout {puts "TESTING ERROR 2\n";exit} "Child process initialized" } sleep 1 - send -- "ls ~/.config | wc -l\r" + send -- "ls -al | wc -l\r" + expect { + timeout {puts "TESTING ERROR 3.1\n";exit} + "5" + } + + send -- "ls -al .bashrc\r" + expect { + timeout {puts "TESTING ERROR 3.2\n";exit} + "netblue" + } + expect { + timeout {puts "TESTING ERROR 3.3\n";exit} + "netblue" + } expect { - timeout {puts "TESTING ERROR 3\n";exit} - "0" + timeout {puts "TESTING ERROR 3.4\n";exit} + ".bashrc" } + + send -- "ls -al .Xauthority\r" + expect { + timeout {puts "TESTING ERROR 3.5\n";exit} + "netblue" + } + expect { + timeout {puts "TESTING ERROR 3.6\n";exit} + "netblue" + } + expect { + timeout {puts "TESTING ERROR 3.7\n";exit} + ".Xauthority" + } + after 100 send -- "exit\r" sleep 1 @@ -55,20 +113,47 @@ if { $overlay == "overlay" } { # C # if { $chroot == "chroot" } { - send -- "touch /tmp/chroot/home/netblue/.config/firejail-test-file\r" - sleep 1 - send -- "firejail --noprofile --chroot=/tmp/chroot --tmpfs=/home/netblue/.config\r" + send -- "firejail --noprofile --chroot=/tmp/chroot --private\r" expect { timeout {puts "TESTING ERROR 4\n";exit} "Child process initialized" } sleep 1 - send -- "ls ~/.config | wc -l\r" + send -- "ls -al | wc -l\r" + expect { + timeout {puts "TESTING ERROR 5.1\n";exit} + "5" + } + + send -- "ls -al .bashrc\r" expect { - timeout {puts "TESTING ERROR 5\n";exit} - "0" + timeout {puts "TESTING ERROR 5.2\n";exit} + "netblue" } + expect { + timeout {puts "TESTING ERROR 5.3\n";exit} + "netblue" + } + expect { + timeout {puts "TESTING ERROR 5.4\n";exit} + ".bashrc" + } + + send -- "ls -al .Xauthority\r" + expect { + timeout {puts "TESTING ERROR 5.5\n";exit} + "netblue" + } + expect { + timeout {puts "TESTING ERROR 5.6\n";exit} + "netblue" + } + expect { + timeout {puts "TESTING ERROR 5.7\n";exit} + ".Xauthority" + } + after 100 send -- "exit\r" sleep 1 -- cgit v1.2.3-70-g09d2