diff options
author | netblue30 <netblue30@yahoo.com> | 2017-03-25 14:16:34 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2017-03-25 14:16:34 -0400 |
commit | 1de3701ab77c8a4d0b2b82acc03351e70f987c5e (patch) | |
tree | 725b957e7b1b900a58cb42fc3d1d05d2488473f1 /test | |
parent | tentative ~/.cache tmpfs implementation (diff) | |
download | firejail-1de3701ab77c8a4d0b2b82acc03351e70f987c5e.tar.gz firejail-1de3701ab77c8a4d0b2b82acc03351e70f987c5e.tar.zst firejail-1de3701ab77c8a4d0b2b82acc03351e70f987c5e.zip |
testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/network/netns.exp | 34 | ||||
-rwxr-xr-x | test/network/network.sh | 3 |
2 files changed, 37 insertions, 0 deletions
diff --git a/test/network/netns.exp b/test/network/netns.exp new file mode 100755 index 000000000..9475cf958 --- /dev/null +++ b/test/network/netns.exp | |||
@@ -0,0 +1,34 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2017 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --netns=red --noprofile\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 1\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | after 100 | ||
16 | |||
17 | send -- "ip link show\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 2\n";exit} | ||
20 | "LOOPBACK" | ||
21 | } | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 3\n";exit} | ||
24 | "DOWN" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 4\n";exit} | ||
28 | "link/loopback" | ||
29 | } | ||
30 | after 100 | ||
31 | send -- "exit\r" | ||
32 | after 100 | ||
33 | |||
34 | puts "all done\n" | ||
diff --git a/test/network/network.sh b/test/network/network.sh index 2c60be0a5..c4c104042 100755 --- a/test/network/network.sh +++ b/test/network/network.sh | |||
@@ -11,6 +11,9 @@ sudo ./configure | |||
11 | echo "TESTING: firemon interface (firemon-interfaces.exp)" | 11 | echo "TESTING: firemon interface (firemon-interfaces.exp)" |
12 | sudo ./firemon-interfaces.exp | 12 | sudo ./firemon-interfaces.exp |
13 | 13 | ||
14 | echo "TESTING: netns (netns.exp)" | ||
15 | ./netns.exp | ||
16 | |||
14 | echo "TESTING: print dns (dns-print.exp)" | 17 | echo "TESTING: print dns (dns-print.exp)" |
15 | ./dns-print.exp | 18 | ./dns-print.exp |
16 | 19 | ||