From 35004af7d8f6ff19908fb89e25e532113afa26f4 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Wed, 9 Nov 2016 19:17:06 -0500 Subject: testing --- test/network/net_veth.exp | 130 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100755 test/network/net_veth.exp (limited to 'test/network/net_veth.exp') diff --git a/test/network/net_veth.exp b/test/network/net_veth.exp new file mode 100755 index 000000000..89dedcb24 --- /dev/null +++ b/test/network/net_veth.exp @@ -0,0 +1,130 @@ +#!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2016 Firejail Authors +# License GPL v2 + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail --net=eth0\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "lo" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "127.0.0.1" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "255.0.0.0" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "UP" +} +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "eth0-" +} +expect { + timeout {puts "TESTING ERROR 6\n";exit} + "255.255.255.0" +} +expect { + timeout {puts "TESTING ERROR 7\n";exit} + "UP" +} +expect { + timeout {puts "TESTING ERROR 8\n";exit} + "Default gateway" +} +expect { + timeout {puts "TESTING ERROR 9\n";exit} + "Child process initialized" +} +sleep 1 +send -- "exit\r" +sleep 1 + +send -- "firejail --net=eth0 --net=eth0 --net=eth0 --net=eth0\r" +expect { + timeout {puts "TESTING ERROR 11\n";exit} + "lo" +} +expect { + timeout {puts "TESTING ERROR 12\n";exit} + "127.0.0.1" +} +expect { + timeout {puts "TESTING ERROR 13\n";exit} + "255.0.0.0" +} +expect { + timeout {puts "TESTING ERROR 14\n";exit} + "UP" +} +expect { + timeout {puts "TESTING ERROR 15\n";exit} + "eth0-" +} +expect { + timeout {puts "TESTING ERROR 16\n";exit} + "255.255.255.0" +} +expect { + timeout {puts "TESTING ERROR 17\n";exit} + "UP" +} +expect { + timeout {puts "TESTING ERROR 18\n";exit} + "eth1-" +} +expect { + timeout {puts "TESTING ERROR 19\n";exit} + "255.255.255.0" +} +expect { + timeout {puts "TESTING ERROR 20\n";exit} + "UP" +} +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "eth2-" +} +expect { + timeout {puts "TESTING ERROR 21\n";exit} + "255.255.255.0" +} +expect { + timeout {puts "TESTING ERROR 22\n";exit} + "UP" +} +expect { + timeout {puts "TESTING ERROR 23\n";exit} + "eth3-" +} +expect { + timeout {puts "TESTING ERROR 24\n";exit} + "255.255.255.0" +} +expect { + timeout {puts "TESTING ERROR 25\n";exit} + "UP" +} +expect { + timeout {puts "TESTING ERROR 26\n";exit} + "Default gateway" +} +expect { + timeout {puts "TESTING ERROR 27\n";exit} + "Child process initialized" +} +sleep 1 +send -- "exit\r" + +after 100 + +puts "\n" + -- cgit v1.2.3-54-g00ecf