From 1de3701ab77c8a4d0b2b82acc03351e70f987c5e Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sat, 25 Mar 2017 14:16:34 -0400 Subject: testing --- test/network/netns.exp | 34 ++++++++++++++++++++++++++++++++++ test/network/network.sh | 3 +++ 2 files changed, 37 insertions(+) create mode 100755 test/network/netns.exp 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 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2017 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --netns=red --noprofile\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Child process initialized" +} +after 100 + +send -- "ip link show\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "LOOPBACK" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "DOWN" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "link/loopback" +} +after 100 +send -- "exit\r" +after 100 + +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 echo "TESTING: firemon interface (firemon-interfaces.exp)" sudo ./firemon-interfaces.exp +echo "TESTING: netns (netns.exp)" +./netns.exp + echo "TESTING: print dns (dns-print.exp)" ./dns-print.exp -- cgit v1.2.3-70-g09d2