aboutsummaryrefslogtreecommitdiffstats
path: root/test/network/netstats.exp
diff options
context:
space:
mode:
authorLibravatar netblue30 <netblue30@protonmail.com>2023-03-07 17:49:25 -0500
committerLibravatar netblue30 <netblue30@protonmail.com>2023-03-07 17:49:25 -0500
commitec7d55fc4404aded7cef1ace81634355a102dcda (patch)
treec3a5fc1811d21188402d5a8d54be0b6149bafee2 /test/network/netstats.exp
parentremove DNS lookup for --netfilter.print and --netfilter6.print commands (diff)
downloadfirejail-ec7d55fc4404aded7cef1ace81634355a102dcda.tar.gz
firejail-ec7d55fc4404aded7cef1ace81634355a102dcda.tar.zst
firejail-ec7d55fc4404aded7cef1ace81634355a102dcda.zip
testing
Diffstat (limited to 'test/network/netstats.exp')
-rwxr-xr-xtest/network/netstats.exp30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/network/netstats.exp b/test/network/netstats.exp
new file mode 100755
index 000000000..5cb272728
--- /dev/null
+++ b/test/network/netstats.exp
@@ -0,0 +1,30 @@
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\r"
11expect {
12 timeout {puts "TESTING ERROR 1\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
14}
15sleep 2
16
17spawn $env(SHELL)
18send -- "firejail --netstats\r"
19expect {
20 timeout {puts "TESTING ERROR 2\n";exit}
21 "statistics only for sandboxes using a new network namespace"
22}
23expect {
24 timeout {puts "TESTING ERROR 3\n";exit}
25 "firejail --name=test --net=br0"
26}
27after 500
28send -- "\r"
29after 500
30puts "\nall done\n"