diff options
-rwxr-xr-x | test/kmsg.exp | 29 | ||||
-rwxr-xr-x | test/test.sh | 3 |
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 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 1\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | sleep 1 | ||
13 | |||
14 | send -- "cat /dev/kmsg\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 2\n";exit} | ||
17 | "Permission denied" | ||
18 | } | ||
19 | sleep 1 | ||
20 | |||
21 | send -- "cat /proc/kmsg\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 3\n";exit} | ||
24 | "Permission denied" | ||
25 | } | ||
26 | sleep 1 | ||
27 | |||
28 | puts "\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* | |||
86 | echo "TESTING: extract command" | 86 | echo "TESTING: extract command" |
87 | ./extract_command.exp | 87 | ./extract_command.exp |
88 | 88 | ||
89 | echo "TESTING: kmsg access" | ||
90 | ./kmsg.exp | ||
91 | |||
89 | echo "TESTING: rlimit" | 92 | echo "TESTING: rlimit" |
90 | ./option_rlimit.exp | 93 | ./option_rlimit.exp |
91 | 94 | ||