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_arp.exp | 71 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100755 test/network/net_arp.exp (limited to 'test/network/net_arp.exp') diff --git a/test/network/net_arp.exp b/test/network/net_arp.exp new file mode 100755 index 000000000..9e07744f3 --- /dev/null +++ b/test/network/net_arp.exp @@ -0,0 +1,71 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --net=br0 sleep 20 &\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +send -- "firejail --net=br0 sleep 20 &\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "Child process initialized" +} +send -- "firejail --net=br0 sleep 20 &\r" +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "Child process initialized" +} +send -- "firejail --net=br0 sleep 20 &\r" +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "Child process initialized" +} +send -- "firejail --net=br0 sleep 20 &\r" +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "Child process initialized" +} + +# will fail +send -- "firejail --net=br0 sleep 20 &\r" +expect { + timeout {puts "TESTING ERROR 5n";exit} + "cannot assign an IP address" +} + +send -- "firejail --net=br0 sleep 20 &\r" +expect { + timeout {puts "TESTING ERROR 6\n";exit} + "cannot assign an IP address" +} + +# check firejail --list +send -- "firejail --list\r" +expect { + timeout {puts "TESTING ERROR 7.1\n";exit} + "sleep 20" +} +expect { + timeout {puts "TESTING ERROR 7.2\n";exit} + "sleep 20" +} +expect { + timeout {puts "TESTING ERROR 7.3\n";exit} + "sleep 20" +} +expect { + timeout {puts "TESTING ERROR 7.4\n";exit} + "sleep 20" +} +expect { + timeout {puts "TESTING ERROR 7.5\n";exit} + "sleep 20" +} + +# wait for snadboxes to be shutdown +sleep 30 +puts "\n" -- cgit v1.2.3-54-g00ecf