From 83f626d79489985152156eee6ecca52c7da8b5ba Mon Sep 17 00:00:00 2001 From: netblue30 Date: Sun, 24 Apr 2016 06:41:28 -0400 Subject: testing --- test/utils/trace.exp | 18 ++++++++++++++++++ test/utils/trace2.exp | 25 ------------------------- test/utils/utils.sh | 5 +++++ 3 files changed, 23 insertions(+), 25 deletions(-) delete mode 100755 test/utils/trace2.exp (limited to 'test/utils') diff --git a/test/utils/trace.exp b/test/utils/trace.exp index 21dd6a559..c08925101 100755 --- a/test/utils/trace.exp +++ b/test/utils/trace.exp @@ -1,4 +1,7 @@ #!/usr/bin/expect -f +# This file is part of Firejail project +# Copyright (C) 2014-2016 Firejail Authors +# License GPL v2 set timeout 30 spawn $env(SHELL) @@ -90,5 +93,20 @@ expect { } sleep 1 +send -- "firejail --trace\r" +expect { + timeout {puts "TESTING ERROR 0\n";exit} + "Child process initialized" +} +expect { + timeout {puts "TESTING ERROR 1\n";exit} + "bash:open /dev/tty" {puts "64bit\n"} + "bash:open64 /dev/tty" {puts "32bit\n"} +} +expect { + timeout {puts "TESTING ERROR 3\n";exit} + "bash:access /etc/terminfo/x/xterm" {puts "debian\n"} + "bash:access /usr/share/terminfo/x/xterm" {puts "arch\n"} +} puts "\nall done\n" diff --git a/test/utils/trace2.exp b/test/utils/trace2.exp deleted file mode 100755 index 38038b58e..000000000 --- a/test/utils/trace2.exp +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/expect -f - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail --trace\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "Child process initialized" -} -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "bash:open /dev/tty" {puts "64bit\n"} - "bash:open64 /dev/tty" {puts "32bit\n"} -} -expect { - timeout {puts "TESTING ERROR 3\n";exit} - "bash:access /etc/terminfo/x/xterm" {puts "debian\n"} - "bash:access /usr/share/terminfo/x/xterm" {puts "arch\n"} -} - -sleep 1 - -puts "\nall done\n" diff --git a/test/utils/utils.sh b/test/utils/utils.sh index 9a1b6601a..8c53feab3 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh @@ -64,3 +64,8 @@ echo "TESTING: join3 (test/utils/join3.exp)" echo "TESTING: join profile (test/utils/join-profile.exp)" ./join-profile.exp +echo "TESTING: trace (test/utils/trace.exp)" +rm -f index.html* +./trace.exp +rm -f index.html* + -- cgit v1.2.3-54-g00ecf