From 021bfd07923a879c1365e965c81bbe01e40fb8aa Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 30 Mar 2018 14:22:30 -0400 Subject: testing --- test/utils/build.exp | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ test/utils/utils.sh | 3 +++ 2 files changed, 53 insertions(+) create mode 100755 test/utils/build.exp (limited to 'test/utils') diff --git a/test/utils/build.exp b/test/utils/build.exp new file mode 100755 index 000000000..916f373b9 --- /dev/null +++ b/test/utils/build.exp @@ -0,0 +1,50 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2018 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --build ls ~\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "private-tmp" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "private-dev" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "blacklist /var" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "private-bin ls," +} +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "caps.drop all" +} +expect { + timeout {puts "TESTING ERROR 6\n";exit} + "nonewprivs" +} +expect { + timeout {puts "TESTING ERROR 7\n";exit} + "seccomp" +} +expect { + timeout {puts "TESTING ERROR 8\n";exit} + "net none" +} +expect { + timeout {puts "TESTING ERROR 9\n";exit} + "shell none" +} +after 100 + + +puts "all done\n" diff --git a/test/utils/utils.sh b/test/utils/utils.sh index 9dd3b67a3..59cd1cfd6 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh @@ -6,6 +6,9 @@ export MALLOC_CHECK_=3 export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) +echo "TESTING: build (test/utils/build.exp)" +./build.exp + echo "TESTING: audit (test/utils/audit.exp)" ./audit.exp -- cgit v1.2.3-70-g09d2