aboutsummaryrefslogtreecommitdiffstats
path: root/test/seccomp-extra/protocol-print.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-03-09 08:39:25 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-03-09 08:39:25 -0500
commitc79aa14295f907ffac0cf5555515602b7393b8b6 (patch)
tree87a114af4e12388e09e2d16d518b50be9ddbe0a6 /test/seccomp-extra/protocol-print.exp
parenttesting (diff)
downloadfirejail-c79aa14295f907ffac0cf5555515602b7393b8b6.tar.gz
firejail-c79aa14295f907ffac0cf5555515602b7393b8b6.tar.zst
firejail-c79aa14295f907ffac0cf5555515602b7393b8b6.zip
testing
Diffstat (limited to 'test/seccomp-extra/protocol-print.exp')
-rwxr-xr-xtest/seccomp-extra/protocol-print.exp59
1 files changed, 59 insertions, 0 deletions
diff --git a/test/seccomp-extra/protocol-print.exp b/test/seccomp-extra/protocol-print.exp
new file mode 100755
index 000000000..7e76e6ff6
--- /dev/null
+++ b/test/seccomp-extra/protocol-print.exp
@@ -0,0 +1,59 @@
1#!/usr/bin/expect -f
2# This file is part of Firejail project
3# Copyright (C) 2014-2023 Firejail Authors
4# License GPL v2
5
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail --name=test0\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14}
15sleep 2
16
17
18spawn $env(SHELL)
19send -- "firejail --name=test1 --profile=protocol1.profile\r"
20expect {
21 timeout {puts "TESTING ERROR 1\n";exit}
22 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
23}
24sleep 2
25
26spawn $env(SHELL)
27send -- "firejail --name=test2 --profile=protocol2.profile\r"
28expect {
29 timeout {puts "TESTING ERROR 2\n";exit}
30 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
31}
32sleep 2
33
34spawn $env(SHELL)
35send -- "firejail --protocol.print=test0\r"
36expect {
37 timeout {puts "TESTING ERROR 3\n";exit}
38 "packet" {puts "TESTING ERROR 4\n";exit}
39 "unix,inet,inet6"
40}
41after 500
42
43send -- "firejail --protocol.print=test1\r"
44expect {
45 timeout {puts "TESTING ERROR 5\n";exit}
46 "inet" {puts "TESTING ERROR 6\n";exit}
47 "unix"
48}
49after 500
50
51send -- "firejail --protocol.print=test2\r"
52expect {
53 timeout {puts "TESTING ERROR 7\n";exit}
54 "unix" {puts "TESTING ERROR 8\n";exit}
55 "inet6,packet"
56}
57after 500
58
59puts "\nall done\n"