diff options
author | netblue30 <netblue30@yahoo.com> | 2016-04-24 06:41:28 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2016-04-24 06:41:28 -0400 |
commit | 83f626d79489985152156eee6ecca52c7da8b5ba (patch) | |
tree | e4d982f6f451c2fed0a3a50deeb1616e611f3484 | |
parent | testing (diff) | |
download | firejail-83f626d79489985152156eee6ecca52c7da8b5ba.tar.gz firejail-83f626d79489985152156eee6ecca52c7da8b5ba.tar.zst firejail-83f626d79489985152156eee6ecca52c7da8b5ba.zip |
testing
-rw-r--r-- | Makefile.in | 1 | ||||
-rwxr-xr-x | test/utils/trace.exp | 18 | ||||
-rwxr-xr-x | test/utils/trace2.exp | 25 | ||||
-rwxr-xr-x | test/utils/utils.sh | 5 |
4 files changed, 24 insertions, 25 deletions
diff --git a/Makefile.in b/Makefile.in index da339b7ed..4f777583c 100644 --- a/Makefile.in +++ b/Makefile.in | |||
@@ -46,6 +46,7 @@ clean: | |||
46 | $(MAKE) -C $$dir clean; \ | 46 | $(MAKE) -C $$dir clean; \ |
47 | done | 47 | done |
48 | rm -f firejail.1 firejail.1.gz firemon.1 firemon.1.gz firecfg.1 firecfg.gz firejail-profile.5 firejail-profile.5.gz firejail-login.5 firejail-login.5.gz firejail-config.5 firejail-config.5.gz firejail*.rpm | 48 | rm -f firejail.1 firejail.1.gz firemon.1 firemon.1.gz firecfg.1 firecfg.gz firejail-profile.5 firejail-profile.5.gz firejail-login.5 firejail-login.5.gz firejail-config.5 firejail-config.5.gz firejail*.rpm |
49 | rm -f test/utils/index.html* | ||
49 | 50 | ||
50 | distclean: clean | 51 | distclean: clean |
51 | for dir in $(APPS); do \ | 52 | for dir in $(APPS); do \ |
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 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2016 Firejail Authors | ||
4 | # License GPL v2 | ||
2 | 5 | ||
3 | set timeout 30 | 6 | set timeout 30 |
4 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
@@ -90,5 +93,20 @@ expect { | |||
90 | } | 93 | } |
91 | sleep 1 | 94 | sleep 1 |
92 | 95 | ||
96 | send -- "firejail --trace\r" | ||
97 | expect { | ||
98 | timeout {puts "TESTING ERROR 0\n";exit} | ||
99 | "Child process initialized" | ||
100 | } | ||
101 | expect { | ||
102 | timeout {puts "TESTING ERROR 1\n";exit} | ||
103 | "bash:open /dev/tty" {puts "64bit\n"} | ||
104 | "bash:open64 /dev/tty" {puts "32bit\n"} | ||
105 | } | ||
106 | expect { | ||
107 | timeout {puts "TESTING ERROR 3\n";exit} | ||
108 | "bash:access /etc/terminfo/x/xterm" {puts "debian\n"} | ||
109 | "bash:access /usr/share/terminfo/x/xterm" {puts "arch\n"} | ||
110 | } | ||
93 | 111 | ||
94 | puts "\nall done\n" | 112 | 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 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --trace\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "Child process initialized" | ||
11 | } | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "bash:open /dev/tty" {puts "64bit\n"} | ||
15 | "bash:open64 /dev/tty" {puts "32bit\n"} | ||
16 | } | ||
17 | expect { | ||
18 | timeout {puts "TESTING ERROR 3\n";exit} | ||
19 | "bash:access /etc/terminfo/x/xterm" {puts "debian\n"} | ||
20 | "bash:access /usr/share/terminfo/x/xterm" {puts "arch\n"} | ||
21 | } | ||
22 | |||
23 | sleep 1 | ||
24 | |||
25 | 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)" | |||
64 | echo "TESTING: join profile (test/utils/join-profile.exp)" | 64 | echo "TESTING: join profile (test/utils/join-profile.exp)" |
65 | ./join-profile.exp | 65 | ./join-profile.exp |
66 | 66 | ||
67 | echo "TESTING: trace (test/utils/trace.exp)" | ||
68 | rm -f index.html* | ||
69 | ./trace.exp | ||
70 | rm -f index.html* | ||
71 | |||