aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@yahoo.com>2016-01-23 10:30:56 -0500
committerLibravatar netblue30 <netblue30@yahoo.com>2016-01-23 10:30:56 -0500
commitc5bf4c3512a0a582310529ec5217b892bef42d15 (patch)
treec9672b1cb014e4e6883a6c0ab76bbb2c4d10b4cb /test
parenttightening unbound and dnscrypt-proxy profiles (diff)
downloadfirejail-c5bf4c3512a0a582310529ec5217b892bef42d15.tar.gz
firejail-c5bf4c3512a0a582310529ec5217b892bef42d15.tar.zst
firejail-c5bf4c3512a0a582310529ec5217b892bef42d15.zip
kmsg testing
Diffstat (limited to 'test')
-rwxr-xr-xtest/kmsg.exp29
-rwxr-xr-xtest/test.sh3
2 files changed, 32 insertions, 0 deletions
diff --git a/test/kmsg.exp b/test/kmsg.exp
new file mode 100755
index 000000000..096bdb708
--- /dev/null
+++ b/test/kmsg.exp
@@ -0,0 +1,29 @@
1#!/usr/bin/expect -f
2
3set timeout 10
4spawn $env(SHELL)
5match_max 100000
6
7send -- "firejail\r"
8expect {
9 timeout {puts "TESTING ERROR 1\n";exit}
10 "Child process initialized"
11}
12sleep 1
13
14send -- "cat /dev/kmsg\r"
15expect {
16 timeout {puts "TESTING ERROR 2\n";exit}
17 "Permission denied"
18}
19sleep 1
20
21send -- "cat /proc/kmsg\r"
22expect {
23 timeout {puts "TESTING ERROR 3\n";exit}
24 "Permission denied"
25}
26sleep 1
27
28puts "\nall done\n"
29
diff --git a/test/test.sh b/test/test.sh
index 44bb7ba99..2c051d13b 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -86,6 +86,9 @@ rm -f index.html*
86echo "TESTING: extract command" 86echo "TESTING: extract command"
87./extract_command.exp 87./extract_command.exp
88 88
89echo "TESTING: kmsg access"
90./kmsg.exp
91
89echo "TESTING: rlimit" 92echo "TESTING: rlimit"
90./option_rlimit.exp 93./option_rlimit.exp
91 94