From fc116c063938d5e141d5fbc38e8013d9832ef315 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Thu, 15 Sep 2016 09:59:11 -0400 Subject: testing --- test/root/profile_tmpfs.exp | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 test/root/profile_tmpfs.exp (limited to 'test/root/profile_tmpfs.exp') diff --git a/test/root/profile_tmpfs.exp b/test/root/profile_tmpfs.exp new file mode 100755 index 000000000..da7c084a2 --- /dev/null +++ b/test/root/profile_tmpfs.exp @@ -0,0 +1,37 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "mkdir /tmp/firejailtestdir\r" +sleep 1 +send -- "ls > /tmp/firejailtestdir/tmpfile\r" +sleep 1 + +send -- "firejail --profile=tmpfs.profile\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} + +# testing private only +send -- "bash\r" +sleep 1 + +send -- "ls -l /tmp/firejailtestdir;pwd\r" +expect { + timeout {puts "TESTING ERROR 1.1\n";exit} + "tmpfile" {puts "TESTING ERROR 1\n";exit} + "home" +} +sleep 1 +send -- "exit\r" +sleep 1 +send -- "exit\r" +sleep 1 +send -- "rm -fr /tmp/firejailtestdir\r" + +sleep 1 + +puts "\nall done\n" -- cgit v1.2.3-54-g00ecf