From dc3564b18f1eafde1ccf46e722f8c2a9c1ee8555 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Wed, 9 Mar 2016 09:51:47 -0500 Subject: fixes --- test/tty.exp | 97 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100755 test/tty.exp (limited to 'test/tty.exp') diff --git a/test/tty.exp b/test/tty.exp new file mode 100755 index 000000000..116f297b2 --- /dev/null +++ b/test/tty.exp @@ -0,0 +1,97 @@ +#!/usr/bin/expect -f + +set timeout 10 +spawn $env(SHELL) +match_max 100000 + +send -- "firejail\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +sleep 2 +send -- "xterm &\r" +sleep 2 +send -- "urxvt &\r" +sleep 2 +send -- "rxvt &\r" +sleep 2 + +send -- "ps aux\r" +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "USER" +} +expect { + timeout {puts "TESTING ERROR 2\n";exit} + "xterm" +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "urxvt" +} +expect { + timeout {puts "TESTING ERROR 4\n";exit} + "rxvt" +} +expect { + timeout {puts "TESTING ERROR 5\n";exit} + "ps aux" +} + +send -- "pkill xterm\r" +sleep 1 +send -- "pkill urxvt\r" +sleep 1 +send -- "pkill rxvt\r" +sleep 1 +send -- "exit\r" +sleep 2 + + +send -- "firejail --private-dev\r" +expect { + timeout {puts "TESTING ERROR 10\n";exit} + "Child process initialized" +} +sleep 2 +send -- "xterm &\r" +sleep 2 +send -- "urxvt &\r" +sleep 2 +send -- "rxvt &\r" +sleep 2 + +send -- "ps aux\r" +expect { + timeout {puts "TESTING ERROR 11\n";exit} + "USER" +} +expect { + timeout {puts "TESTING ERROR 12\n";exit} + "xterm" +} +expect { + timeout {puts "TESTING ERROR 13\n";exit} + "urxvt" +} +expect { + timeout {puts "TESTING ERROR 14\n";exit} + "rxvt" +} +expect { + timeout {puts "TESTING ERROR 15\n";exit} + "ps aux" +} + +send -- "pkill xterm\r" +sleep 1 +send -- "pkill urxvt\r" +sleep 1 +send -- "pkill rxvt\r" +sleep 1 +send -- "exit\r" +sleep 2 + +puts "\n" + -- cgit v1.2.3-54-g00ecf