diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-30 07:31:21 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-30 07:31:21 -0400 |
commit | ea774178f6d8f613c96c0d001fed200155b704b7 (patch) | |
tree | ee2de7fcce0499dcb21cf475a068fe8957ab07bb /test/filters/seccomp-ptrace.exp | |
parent | added make test-filters (diff) | |
download | firejail-ea774178f6d8f613c96c0d001fed200155b704b7.tar.gz firejail-ea774178f6d8f613c96c0d001fed200155b704b7.tar.zst firejail-ea774178f6d8f613c96c0d001fed200155b704b7.zip |
added make test-filters
Diffstat (limited to 'test/filters/seccomp-ptrace.exp')
-rwxr-xr-x | test/filters/seccomp-ptrace.exp | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/filters/seccomp-ptrace.exp b/test/filters/seccomp-ptrace.exp new file mode 100755 index 000000000..fba9ea92f --- /dev/null +++ b/test/filters/seccomp-ptrace.exp | |||
@@ -0,0 +1,26 @@ | |||
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 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --noprofile --seccomp\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 2 | ||
16 | |||
17 | send -- "strace ls\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "Bad system call" {puts "version 1\n";} | ||
21 | " unexpected signal 31" {puts "version 2\n"} | ||
22 | } | ||
23 | |||
24 | send -- "exit\r" | ||
25 | sleep 1 | ||
26 | puts "all done\n" | ||