aboutsummaryrefslogtreecommitdiffstats
path: root/test/kmsg.exp
diff options
context:
space:
mode:
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