From 57bea6c8c4d1bd666ce57057b1cbb681b3cc4afc Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 3 May 2016 08:41:24 -0400 Subject: networking features testing --- test/network/net_local.exp | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100755 test/network/net_local.exp (limited to 'test/network/net_local.exp') diff --git a/test/network/net_local.exp b/test/network/net_local.exp new file mode 100755 index 000000000..642213658 --- /dev/null +++ b/test/network/net_local.exp @@ -0,0 +1,45 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +# check ip address +send -- "firejail --noprofile --debug\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Using the local network stack" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} +sleep 2 +send -- "exit\r" +sleep 2 + +# check loopback +send -- "firejail --noprofile\r" +expect { + timeout {puts "TESTING ERROR 9\n";exit} + "Child process initialized" +} +sleep 1 + + +send -- "/sbin/ifconfig\r" +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "lo" +} +expect { + timeout {puts "TESTING ERROR 6\n";exit} + "127.0.0.1" +} +expect { + timeout {puts "TESTING ERROR 7\n";exit} + "255.0.0.0" +} + +puts "all done\n" + -- cgit v1.2.3-54-g00ecf