aboutsummaryrefslogtreecommitdiffstats
path: root/test/utils/audit.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-11-20 21:23:10 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-11-20 21:23:10 -0500
commit13ef7fba2bdf48319f68a7362779c41edae19651 (patch)
treea746c86a4a13a53243b6ba7d615cc4fdbdd74611 /test/utils/audit.exp
parentcaps testing (diff)
downloadfirejail-13ef7fba2bdf48319f68a7362779c41edae19651.tar.gz
firejail-13ef7fba2bdf48319f68a7362779c41edae19651.tar.zst
firejail-13ef7fba2bdf48319f68a7362779c41edae19651.zip
testing
Diffstat (limited to 'test/utils/audit.exp')
-rwxr-xr-xtest/utils/audit.exp79
1 files changed, 79 insertions, 0 deletions
diff --git a/test/utils/audit.exp b/test/utils/audit.exp
new file mode 100755
index 000000000..931b46981
--- /dev/null
+++ b/test/utils/audit.exp
@@ -0,0 +1,79 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2016 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --audit\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "Firejail Audit"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "is running in a PID namespace"
18}
19expect {
20 timeout {puts "TESTING ERROR 2\n";exit}
21 "container/sandbox firejail"
22}
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "seccomp BPF enabled"
26}
27expect {
28 timeout {puts "TESTING ERROR 4\n";exit}
29 "all capabilities are disabled"
30}
31expect {
32 timeout {puts "TESTING ERROR 5\n";exit}
33 "dev directory seems to be fully populated"
34}
35after 100
36
37
38send -- "firejail --audit=/usr/lib/firejail/faudit\r"
39expect {
40 timeout {puts "TESTING ERROR 6\n";exit}
41 "Firejail Audit"
42}
43expect {
44 timeout {puts "TESTING ERROR 7\n";exit}
45 "is running in a PID namespace"
46}
47expect {
48 timeout {puts "TESTING ERROR 8\n";exit}
49 "container/sandbox firejail"
50}
51expect {
52 timeout {puts "TESTING ERROR 9\n";exit}
53 "seccomp BPF enabled"
54}
55expect {
56 timeout {puts "TESTING ERROR 10\n";exit}
57 "all capabilities are disabled"
58}
59expect {
60 timeout {puts "TESTING ERROR 11\n";exit}
61 "dev directory seems to be fully populated"
62}
63after 100
64
65send -- "firejail --audit=blablabla\r"
66expect {
67 timeout {puts "TESTING ERROR 12\n";exit}
68 "cannot find the audit program"
69}
70after 100
71
72send -- "firejail --audit=\r"
73expect {
74 timeout {puts "TESTING ERROR 12\n";exit}
75 "invalid audit program"
76}
77after 100
78
79puts "\nall done\n"