From e3a306f51bf6d76c9c8d40deeecb0ec0147624ff Mon Sep 17 00:00:00 2001 From: netblue30 Date: Tue, 5 Apr 2016 12:08:44 -0400 Subject: grsecurity: testing --- test/features/1.1.exp | 3 ++- test/features/1.10.exp | 3 ++- test/features/1.2.exp | 3 ++- test/features/1.4.exp | 3 ++- test/features/1.5.exp | 3 ++- test/features/1.6.exp | 3 ++- test/features/1.7.exp | 3 ++- test/features/1.8.exp | 3 ++- test/features/2.1.exp | 3 ++- test/features/2.2.exp | 3 ++- test/features/2.3.exp | 3 ++- test/features/2.4.exp | 3 ++- test/features/2.5.exp | 3 ++- test/features/2.6.exp | 21 +++++++++++---------- test/features/3.1.exp | 3 ++- test/features/3.10.exp | 3 ++- test/features/3.11.exp | 3 ++- test/features/3.2.exp | 3 ++- test/features/3.3.exp | 3 ++- test/features/3.4.exp | 3 ++- test/features/3.5.exp | 3 ++- test/features/3.6.exp | 3 ++- test/features/3.7.exp | 3 ++- test/features/3.8.exp | 3 ++- test/features/3.9.exp | 3 ++- test/invalid_filename.exp | 2 +- test/option_chroot_overlay.exp | 2 +- 27 files changed, 61 insertions(+), 36 deletions(-) (limited to 'test') diff --git a/test/features/1.1.exp b/test/features/1.1.exp index 0d02b54c1..804b73135 100755 --- a/test/features/1.1.exp +++ b/test/features/1.1.exp @@ -36,7 +36,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/1.10.exp b/test/features/1.10.exp index d9ed8cc6e..e7d51007c 100755 --- a/test/features/1.10.exp +++ b/test/features/1.10.exp @@ -37,7 +37,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/1.2.exp b/test/features/1.2.exp index 65fcd54ae..6f7cae888 100755 --- a/test/features/1.2.exp +++ b/test/features/1.2.exp @@ -60,7 +60,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/1.4.exp b/test/features/1.4.exp index 1c626518b..d6f373e2a 100755 --- a/test/features/1.4.exp +++ b/test/features/1.4.exp @@ -49,7 +49,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/1.5.exp b/test/features/1.5.exp index 56530f3f4..a17504e74 100755 --- a/test/features/1.5.exp +++ b/test/features/1.5.exp @@ -36,7 +36,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/1.6.exp b/test/features/1.6.exp index e8ab456e4..0db929c5a 100755 --- a/test/features/1.6.exp +++ b/test/features/1.6.exp @@ -36,7 +36,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/1.7.exp b/test/features/1.7.exp index 2b79ea6be..b838c092f 100755 --- a/test/features/1.7.exp +++ b/test/features/1.7.exp @@ -38,7 +38,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/1.8.exp b/test/features/1.8.exp index dd525df49..493a87328 100755 --- a/test/features/1.8.exp +++ b/test/features/1.8.exp @@ -73,7 +73,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 send -- "ls /etc/firejail\r" diff --git a/test/features/2.1.exp b/test/features/2.1.exp index 07d6a9820..074b5989b 100755 --- a/test/features/2.1.exp +++ b/test/features/2.1.exp @@ -52,7 +52,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --hostname=bingo --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/2.2.exp b/test/features/2.2.exp index 9e3878a4d..f30ccaf79 100755 --- a/test/features/2.2.exp +++ b/test/features/2.2.exp @@ -44,7 +44,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --dns=4.2.2.1 --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/2.3.exp b/test/features/2.3.exp index 1363e41b6..63caab14c 100755 --- a/test/features/2.3.exp +++ b/test/features/2.3.exp @@ -107,7 +107,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --net=eth0 --overlay --dns=8.8.8.8 --dns=8.8.4.4\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/2.4.exp b/test/features/2.4.exp index 0c4808a1a..fed596410 100755 --- a/test/features/2.4.exp +++ b/test/features/2.4.exp @@ -95,7 +95,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --net=br0 --overlay\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/2.5.exp b/test/features/2.5.exp index a3a330643..1d6105ae8 100755 --- a/test/features/2.5.exp +++ b/test/features/2.5.exp @@ -47,7 +47,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --interface=eth0.6\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/2.6.exp b/test/features/2.6.exp index f3eea2fd6..596e8f435 100755 --- a/test/features/2.6.exp +++ b/test/features/2.6.exp @@ -12,17 +12,17 @@ set chroot [lindex $argv 1] # # N # -send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10\r" +send -- "firejail --noprofile --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "Child process initialized" } sleep 1 -send -- "netstat -rn\r" +send -- "ip route show\r" expect { timeout {puts "TESTING ERROR 1\n";exit} - "0.0.0.0 192.168.1.10" + "default via 192.168.1.10 dev eth0" } after 100 send -- "exit\r" @@ -32,17 +32,18 @@ sleep 1 # O # if { $overlay == "overlay" } { - send -- "firejail --noprofile --overlay --net=eth0 --defaultgw=192.168.1.10\r" + send -- "firejail --noprofile --overlay --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 - send -- "netstat -rn\r" + send -- "ip route show\r" expect { timeout {puts "TESTING ERROR 3\n";exit} - "0.0.0.0 192.168.1.10" + "default via 192.168.1.10 dev eth0" } after 100 send -- "exit\r" @@ -53,17 +54,17 @@ if { $overlay == "overlay" } { # C # if { $chroot == "chroot" } { - send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10\r" + send -- "firejail --noprofile --chroot=/tmp/chroot --net=eth0 --defaultgw=192.168.1.10 --protocol=unix,inet,netlink\r" expect { timeout {puts "TESTING ERROR 4\n";exit} "Child process initialized" } sleep 1 - send -- "netstat -rn\r" + send -- "ip route show\r" expect { timeout {puts "TESTING ERROR 5\n";exit} - "0.0.0.0 192.168.1.10" + "default via 192.168.1.10 dev eth0" } after 100 send -- "exit\r" diff --git a/test/features/3.1.exp b/test/features/3.1.exp index c55f3aa8a..046c703b7 100755 --- a/test/features/3.1.exp +++ b/test/features/3.1.exp @@ -66,7 +66,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --private\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.10.exp b/test/features/3.10.exp index 47da7f1c2..4a06463a7 100755 --- a/test/features/3.10.exp +++ b/test/features/3.10.exp @@ -74,7 +74,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --whitelist=/tmp/test1dir\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.11.exp b/test/features/3.11.exp index 3a5e38257..dc41ed743 100755 --- a/test/features/3.11.exp +++ b/test/features/3.11.exp @@ -69,7 +69,8 @@ if { $overlay == "overlay" } { send -- "firejail --profile=3.11.profile\r" expect { timeout {puts "TESTING ERROR 10\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.2.exp b/test/features/3.2.exp index 6f743c414..be20b1547 100755 --- a/test/features/3.2.exp +++ b/test/features/3.2.exp @@ -37,7 +37,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --read-only=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.3.exp b/test/features/3.3.exp index 74260cad3..bb2c34dc1 100755 --- a/test/features/3.3.exp +++ b/test/features/3.3.exp @@ -36,7 +36,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --blacklist=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.4.exp b/test/features/3.4.exp index 3f316af5b..7ed439669 100755 --- a/test/features/3.4.exp +++ b/test/features/3.4.exp @@ -79,7 +79,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --whitelist=/home/netblue/.config\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.5.exp b/test/features/3.5.exp index b1a16830d..aed5fe836 100755 --- a/test/features/3.5.exp +++ b/test/features/3.5.exp @@ -37,7 +37,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --private-dev\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.6.exp b/test/features/3.6.exp index 6117485da..fbb3986a0 100755 --- a/test/features/3.6.exp +++ b/test/features/3.6.exp @@ -36,7 +36,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --private-etc=group,hostname,hosts,nsswitch.conf,passwd,resolv.conf,skel\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.7.exp b/test/features/3.7.exp index d8236b851..2a9ce84d6 100755 --- a/test/features/3.7.exp +++ b/test/features/3.7.exp @@ -45,7 +45,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --private-tmp\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.8.exp b/test/features/3.8.exp index 2405e4fdb..94a1abf67 100755 --- a/test/features/3.8.exp +++ b/test/features/3.8.exp @@ -37,7 +37,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --private-bin=bash,cat,cp,ls,wc\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/features/3.9.exp b/test/features/3.9.exp index a1797804f..660ccbe05 100755 --- a/test/features/3.9.exp +++ b/test/features/3.9.exp @@ -38,7 +38,8 @@ if { $overlay == "overlay" } { send -- "firejail --noprofile --overlay --whitelist=/dev/tty --whitelist=/dev/null\r" expect { timeout {puts "TESTING ERROR 2\n";exit} - "Child process initialized" + "overlay option is not available" {puts "grsecurity\n"; exit} + "Child process initialized" {puts "normal system\n"} } sleep 1 diff --git a/test/invalid_filename.exp b/test/invalid_filename.exp index 8b8087e9b..fe8bd8c25 100755 --- a/test/invalid_filename.exp +++ b/test/invalid_filename.exp @@ -57,7 +57,7 @@ send -- "firejail --debug-check-filename --noprofile --chroot=\"bla&&bla\"\r" expect { timeout {puts "TESTING ERROR 3.1\n";exit} "Checking filename bla&&bla" {puts "normal system\n"} - "Error: --chroot option is not available on GRSecurity systems" { puts "\nall done\n"; exit} + "Error: --chroot option is not available on Grsecurity systems" { puts "\nall done\n"; exit} } expect { timeout {puts "TESTING ERROR 3.2\n";exit} diff --git a/test/option_chroot_overlay.exp b/test/option_chroot_overlay.exp index dd1b8eb28..08ffb1b43 100755 --- a/test/option_chroot_overlay.exp +++ b/test/option_chroot_overlay.exp @@ -8,7 +8,7 @@ send -- "firejail --chroot=/tmp/chroot --overlay\r" expect { timeout {puts "TESTING ERROR 0\n";exit} "mutually exclusive" {puts "normal system\n"} - "Error: --chroot option is not available on GRSecurity systems" { puts "\nall done\n"; exit} + "Error: --chroot option is not available on Grsecurity systems" { puts "\nall done\n"; exit} } sleep 1 -- cgit v1.2.3-70-g09d2