diff options
author | netblue30 <netblue30@yahoo.com> | 2018-03-30 14:22:30 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-03-30 14:22:30 -0400 |
commit | 021bfd07923a879c1365e965c81bbe01e40fb8aa (patch) | |
tree | 94a82b361a2c0c652e6c0a1e623bb29028eb3466 /test | |
parent | nodbus man pages, etc. (diff) | |
download | firejail-021bfd07923a879c1365e965c81bbe01e40fb8aa.tar.gz firejail-021bfd07923a879c1365e965c81bbe01e40fb8aa.tar.zst firejail-021bfd07923a879c1365e965c81bbe01e40fb8aa.zip |
testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/utils/build.exp | 50 | ||||
-rwxr-xr-x | test/utils/utils.sh | 3 |
2 files changed, 53 insertions, 0 deletions
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 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --build ls ~\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "private-tmp" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 2\n";exit} | ||
17 | "private-dev" | ||
18 | } | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3\n";exit} | ||
21 | "blacklist /var" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 4\n";exit} | ||
25 | "private-bin ls," | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 5\n";exit} | ||
29 | "caps.drop all" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 6\n";exit} | ||
33 | "nonewprivs" | ||
34 | } | ||
35 | expect { | ||
36 | timeout {puts "TESTING ERROR 7\n";exit} | ||
37 | "seccomp" | ||
38 | } | ||
39 | expect { | ||
40 | timeout {puts "TESTING ERROR 8\n";exit} | ||
41 | "net none" | ||
42 | } | ||
43 | expect { | ||
44 | timeout {puts "TESTING ERROR 9\n";exit} | ||
45 | "shell none" | ||
46 | } | ||
47 | after 100 | ||
48 | |||
49 | |||
50 | 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 @@ | |||
6 | export MALLOC_CHECK_=3 | 6 | export MALLOC_CHECK_=3 |
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | 7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
8 | 8 | ||
9 | echo "TESTING: build (test/utils/build.exp)" | ||
10 | ./build.exp | ||
11 | |||
9 | echo "TESTING: audit (test/utils/audit.exp)" | 12 | echo "TESTING: audit (test/utils/audit.exp)" |
10 | ./audit.exp | 13 | ./audit.exp |
11 | 14 | ||