aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/net-print.exp
diff options
context:
space:
mode:
Diffstat (limited to 'test/network/net-print.exp')
-rwxr-xr-xtest/network/net-print.exp34
1 files changed, 34 insertions, 0 deletions
diff --git a/test/network/net-print.exp b/test/network/net-print.exp
new file mode 100755
index 000000000..691114cf4
--- /dev/null
+++ b/test/network/net-print.exp
@@ -0,0 +1,34 @@
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=test --net=br0 --ip=10.10.20.9\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14}
15sleep 1
16
17spawn $env(SHELL)
18send -- "firejail --net.print=test\r"
19expect {
20 timeout {puts "TESTING ERROR 1\n";exit}
21 "lo"
22}
23expect {
24 timeout {puts "TESTING ERROR 2\n";exit}
25 "eth0"
26}
27expect {
28 timeout {puts "TESTING ERROR 3\n";exit}
29 "10.10.20.9"
30}
31
32after 500
33
34puts "\nall done\n"