aboutsummaryrefslogtreecommitdiffstats
path: root/test/kmsg.exp
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/kmsg.exp
parenttightening unbound and dnscrypt-proxy profiles (diff)
downloadfirejail-c5bf4c3512a0a582310529ec5217b892bef42d15.tar.gz
firejail-c5bf4c3512a0a582310529ec5217b892bef42d15.tar.zst
firejail-c5bf4c3512a0a582310529ec5217b892bef42d15.zip
kmsg testing
Diffstat (limited to 'test/kmsg.exp')
-rwxr-xr-xtest/kmsg.exp29
1 files changed, 29 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