diff options
author | netblue30 <netblue30@yahoo.com> | 2018-08-21 08:30:09 -0400 |
---|---|---|
committer | netblue30 <netblue30@yahoo.com> | 2018-08-21 08:30:09 -0400 |
commit | ed83ad0ed67f3c753f51b186df756c65fdb8ced2 (patch) | |
tree | ac5bc2995203a4aa6b3525c7bced639629ea2869 /test | |
parent | removed --output, --trace, --tracelog (diff) | |
download | firejail-ed83ad0ed67f3c753f51b186df756c65fdb8ced2.tar.gz firejail-ed83ad0ed67f3c753f51b186df756c65fdb8ced2.tar.zst firejail-ed83ad0ed67f3c753f51b186df756c65fdb8ced2.zip |
testing
Diffstat (limited to 'test')
-rwxr-xr-x | test/environment/environment.sh | 14 | ||||
-rwxr-xr-x | test/environment/output.exp | 87 | ||||
-rwxr-xr-x | test/environment/output.sh | 9 | ||||
-rwxr-xr-x | test/environment/rlimit-bad-profile.exp | 35 | ||||
-rwxr-xr-x | test/environment/rlimit-bad.exp | 34 | ||||
-rw-r--r-- | test/environment/rlimit-bad1.profile | 1 | ||||
-rw-r--r-- | test/environment/rlimit-bad2.profile | 1 | ||||
-rw-r--r-- | test/environment/rlimit-bad3.profile | 1 | ||||
-rw-r--r-- | test/environment/rlimit-bad4.profile | 1 | ||||
-rwxr-xr-x | test/environment/rlimit-profile.exp | 37 | ||||
-rwxr-xr-x | test/environment/rlimit.exp | 41 | ||||
-rw-r--r-- | test/environment/rlimit.profile | 5 | ||||
-rwxr-xr-x | test/fs/fs.sh | 6 | ||||
-rwxr-xr-x | test/fs/private-etc-empty.exp | 42 | ||||
-rw-r--r-- | test/fs/private-etc-empty.profile | 1 | ||||
-rwxr-xr-x | test/fs/private-etc.exp | 72 | ||||
-rwxr-xr-x | test/utils/trace.exp | 115 | ||||
-rwxr-xr-x | test/utils/utils.sh | 5 |
18 files changed, 0 insertions, 507 deletions
diff --git a/test/environment/environment.sh b/test/environment/environment.sh index 97ba8ba58..36811ba07 100755 --- a/test/environment/environment.sh +++ b/test/environment/environment.sh | |||
@@ -26,9 +26,6 @@ cp -- /bin/bash -testdir/. | |||
26 | ./doubledash.exp | 26 | ./doubledash.exp |
27 | rm -fr -- -testdir | 27 | rm -fr -- -testdir |
28 | 28 | ||
29 | echo "TESTING: output (test/environment/output.exp)" | ||
30 | ./output.exp | ||
31 | |||
32 | echo "TESTING: extract command (extract_command.exp)" | 29 | echo "TESTING: extract command (extract_command.exp)" |
33 | ./extract_command.exp | 30 | ./extract_command.exp |
34 | 31 | ||
@@ -105,14 +102,3 @@ else | |||
105 | echo "TESTING SKIP: ibus not configured" | 102 | echo "TESTING SKIP: ibus not configured" |
106 | fi | 103 | fi |
107 | 104 | ||
108 | echo "TESTING: rlimit (test/environment/rlimit.exp)" | ||
109 | ./rlimit.exp | ||
110 | |||
111 | echo "TESTING: rlimit profile (test/environment/rlimit-profile.exp)" | ||
112 | ./rlimit-profile.exp | ||
113 | |||
114 | echo "TESTING: rlimit errors (test/environment/rlimit-bad.exp)" | ||
115 | ./rlimit-bad.exp | ||
116 | |||
117 | echo "TESTING: rlimit errors profile (test/environment/rlimit-bad-profile.exp)" | ||
118 | ./rlimit-bad-profile.exp | ||
diff --git a/test/environment/output.exp b/test/environment/output.exp deleted file mode 100755 index d175ddae2..000000000 --- a/test/environment/output.exp +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "rm -f logfile*\r" | ||
8 | sleep 1 | ||
9 | puts "\n" | ||
10 | |||
11 | send -- "firejail --output=logfile -- ./output.sh\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "20000" | ||
15 | } | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
18 | "60000" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
22 | "100000" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
26 | "120000" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
30 | "14999" | ||
31 | } | ||
32 | sleep 2 | ||
33 | puts "\n" | ||
34 | |||
35 | |||
36 | set timeout 2 | ||
37 | send -- "ls -al logfile*\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 2\n";exit} | ||
40 | "logfile" | ||
41 | } | ||
42 | expect { | ||
43 | timeout {puts "TESTING ERROR 3\n";exit} | ||
44 | "logfile.1" | ||
45 | } | ||
46 | expect { | ||
47 | timeout {puts "TESTING ERROR 4\n";exit} | ||
48 | "logfile.2" | ||
49 | } | ||
50 | expect { | ||
51 | timeout {puts "TESTING ERROR 5\n";exit} | ||
52 | "logfile.3" | ||
53 | } | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 6\n";exit} | ||
56 | "logfile.4" | ||
57 | } | ||
58 | expect { | ||
59 | timeout {puts "TESTING ERROR 7\n";exit} | ||
60 | "logfile.5" | ||
61 | } | ||
62 | after 100 | ||
63 | send -- "rm -f logfile*\r" | ||
64 | |||
65 | |||
66 | send -- "firejail --output=../logfile -- ./output.sh\r" | ||
67 | expect { | ||
68 | timeout {puts "TESTING ERROR 8\n";exit} | ||
69 | "invalid output file" | ||
70 | } | ||
71 | after 100 | ||
72 | |||
73 | send -- "firejail --output=/etc -- ./output.sh\r" | ||
74 | expect { | ||
75 | timeout {puts "TESTING ERROR 9\n";exit} | ||
76 | "invalid output file" | ||
77 | } | ||
78 | after 100 | ||
79 | |||
80 | send -- "firejail --output=/etc/firejail/zoom.profile -- ./output.sh\r" | ||
81 | expect { | ||
82 | timeout {puts "TESTING ERROR 10\n";exit} | ||
83 | "the output file needs to be owned by the current user" | ||
84 | } | ||
85 | |||
86 | after 100 | ||
87 | puts "\nall done\n" | ||
diff --git a/test/environment/output.sh b/test/environment/output.sh deleted file mode 100755 index 2be188e3a..000000000 --- a/test/environment/output.sh +++ /dev/null | |||
@@ -1,9 +0,0 @@ | |||
1 | #!/bin/bash | ||
2 | |||
3 | i="0" | ||
4 | |||
5 | while [ $i -lt 150000 ] | ||
6 | do | ||
7 | echo message number $i | ||
8 | i=$[$i+1] | ||
9 | done | ||
diff --git a/test/environment/rlimit-bad-profile.exp b/test/environment/rlimit-bad-profile.exp deleted file mode 100755 index cd77402fd..000000000 --- a/test/environment/rlimit-bad-profile.exp +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | |||
8 | send -- "firejail --profile=rlimit-bad1.profile\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 4\n";exit} | ||
11 | "invalid rlimit" | ||
12 | } | ||
13 | after 100 | ||
14 | |||
15 | send -- "firejail --profile=rlimit-bad2.profile\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 5\n";exit} | ||
18 | "invalid rlimit" | ||
19 | } | ||
20 | after 100 | ||
21 | |||
22 | send -- "firejail --profile=rlimit-bad3.profile\r" | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 6\n";exit} | ||
25 | "invalid rlimit" | ||
26 | } | ||
27 | after 100 | ||
28 | send -- "firejail --profile=rlimit-bad4.profile\r" | ||
29 | expect { | ||
30 | timeout {puts "TESTING ERROR 7\n";exit} | ||
31 | "invalid rlimit" | ||
32 | } | ||
33 | after 100 | ||
34 | |||
35 | puts "\nall done\n" | ||
diff --git a/test/environment/rlimit-bad.exp b/test/environment/rlimit-bad.exp deleted file mode 100755 index 0a2fe9c98..000000000 --- a/test/environment/rlimit-bad.exp +++ /dev/null | |||
@@ -1,34 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | spawn $env(SHELL) | ||
5 | match_max 100000 | ||
6 | |||
7 | send -- "firejail --rlimit-fsize=-1024\r" | ||
8 | expect { | ||
9 | timeout {puts "TESTING ERROR 0\n";exit} | ||
10 | "invalid rlimit" | ||
11 | } | ||
12 | after 100 | ||
13 | |||
14 | send -- "firejail --rlimit-nofile=asdf\r" | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "invalid rlimit" | ||
18 | } | ||
19 | after 100 | ||
20 | |||
21 | send -- "firejail --rlimit-nproc=100.23\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 2\n";exit} | ||
24 | "invalid rlimit" | ||
25 | } | ||
26 | after 100 | ||
27 | send -- "firejail --rlimit-sigpending=2345-78\r" | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 3\n";exit} | ||
30 | "invalid rlimit" | ||
31 | } | ||
32 | after 100 | ||
33 | |||
34 | puts "\nall done\n" | ||
diff --git a/test/environment/rlimit-bad1.profile b/test/environment/rlimit-bad1.profile deleted file mode 100644 index b6d3340d8..000000000 --- a/test/environment/rlimit-bad1.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | rlimit-fsize -1024 | ||
diff --git a/test/environment/rlimit-bad2.profile b/test/environment/rlimit-bad2.profile deleted file mode 100644 index ef3f243c6..000000000 --- a/test/environment/rlimit-bad2.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | rlimit-nofile asdf | ||
diff --git a/test/environment/rlimit-bad3.profile b/test/environment/rlimit-bad3.profile deleted file mode 100644 index af016a29f..000000000 --- a/test/environment/rlimit-bad3.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | rlimit-nproc 100.23 | ||
diff --git a/test/environment/rlimit-bad4.profile b/test/environment/rlimit-bad4.profile deleted file mode 100644 index 6156b34a7..000000000 --- a/test/environment/rlimit-bad4.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | rlimit-sigpending 67asd56 | ||
diff --git a/test/environment/rlimit-profile.exp b/test/environment/rlimit-profile.exp deleted file mode 100755 index 43d6a3ee0..000000000 --- a/test/environment/rlimit-profile.exp +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | #cd /home | ||
5 | spawn $env(SHELL) | ||
6 | match_max 100000 | ||
7 | |||
8 | send -- "firejail --profile=rlimit.profile\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "cat /proc/self/limits\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
18 | "Max file size 1024 1024" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
22 | "Max processes 1000 1000" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
26 | "Max open files 500 500" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
30 | "Max address space 123456789012 123456789012" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 1.5\n";exit} | ||
34 | "Max pending signals 200 200" | ||
35 | } | ||
36 | after 100 | ||
37 | puts "\nall done\n" | ||
diff --git a/test/environment/rlimit.exp b/test/environment/rlimit.exp deleted file mode 100755 index 38cdc3eea..000000000 --- a/test/environment/rlimit.exp +++ /dev/null | |||
@@ -1,41 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | |||
3 | set timeout 10 | ||
4 | cd /home | ||
5 | spawn $env(SHELL) | ||
6 | match_max 100000 | ||
7 | |||
8 | send -- "firejail --rlimit-fsize=1024 --rlimit-nproc=1000 --rlimit-nofile=500 --rlimit-sigpending=200 --rlimit-as=123456789012\r" | ||
9 | expect { | ||
10 | timeout {puts "TESTING ERROR 0\n";exit} | ||
11 | "Child process initialized" | ||
12 | } | ||
13 | sleep 1 | ||
14 | |||
15 | send -- "cat /proc/self/limits; pwd\r" | ||
16 | expect { | ||
17 | timeout {puts "TESTING ERROR 1.1\n";exit} | ||
18 | "Max file size 1024 1024" | ||
19 | } | ||
20 | expect { | ||
21 | timeout {puts "TESTING ERROR 1.2\n";exit} | ||
22 | "Max processes 1000 1000" | ||
23 | } | ||
24 | expect { | ||
25 | timeout {puts "TESTING ERROR 1.3\n";exit} | ||
26 | "Max open files 500 500" | ||
27 | } | ||
28 | expect { | ||
29 | timeout {puts "TESTING ERROR 1.4\n";exit} | ||
30 | "Max address space 123456789012 123456789012" | ||
31 | } | ||
32 | expect { | ||
33 | timeout {puts "TESTING ERROR 1.5\n";exit} | ||
34 | "Max pending signals 200 200" | ||
35 | } | ||
36 | expect { | ||
37 | timeout {puts "TESTING ERROR 1.6\n";exit} | ||
38 | "home" | ||
39 | } | ||
40 | after 100 | ||
41 | puts "\nall done\n" | ||
diff --git a/test/environment/rlimit.profile b/test/environment/rlimit.profile deleted file mode 100644 index a57471604..000000000 --- a/test/environment/rlimit.profile +++ /dev/null | |||
@@ -1,5 +0,0 @@ | |||
1 | rlimit-fsize 1024 | ||
2 | rlimit-nproc 1000 | ||
3 | rlimit-nofile 500 | ||
4 | rlimit-sigpending 200 | ||
5 | rlimit-as 123456789012 | ||
diff --git a/test/fs/fs.sh b/test/fs/fs.sh index 28f7185da..b4d2cf9c2 100755 --- a/test/fs/fs.sh +++ b/test/fs/fs.sh | |||
@@ -43,12 +43,6 @@ echo "TESTING: private home dir (test/fs/private-home-dir.exp)" | |||
43 | echo "TESTING: private home dir same as user home (test/fs/private-homedir.exp)" | 43 | echo "TESTING: private home dir same as user home (test/fs/private-homedir.exp)" |
44 | ./private-homedir.exp | 44 | ./private-homedir.exp |
45 | 45 | ||
46 | echo "TESTING: private-etc (test/fs/private-etc.exp)" | ||
47 | ./private-etc.exp | ||
48 | |||
49 | echo "TESTING: empty private-etc (test/fs/private-etc-empty.exp)" | ||
50 | ./private-etc-empty.exp | ||
51 | |||
52 | echo "TESTING: macros (test/fs/macro..exp)" | 46 | echo "TESTING: macros (test/fs/macro..exp)" |
53 | ./macro.exp | 47 | ./macro.exp |
54 | 48 | ||
diff --git a/test/fs/private-etc-empty.exp b/test/fs/private-etc-empty.exp deleted file mode 100755 index 8506b664c..000000000 --- a/test/fs/private-etc-empty.exp +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --private-etc=blablabla\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | sleep 1 | ||
16 | |||
17 | send -- "ls -l /etc | wc -l\r" | ||
18 | expect { | ||
19 | timeout {puts "TESTING ERROR 1\n";exit} | ||
20 | "0" {puts "Debian\n"} | ||
21 | "1" {puts "Arch\n"} | ||
22 | } | ||
23 | send -- "exit\r" | ||
24 | sleep 1 | ||
25 | |||
26 | send -- "firejail --profile=private-etc-empty.profile\r" | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 0\n";exit} | ||
29 | "Child process initialized" | ||
30 | } | ||
31 | sleep 1 | ||
32 | |||
33 | send -- "ls -l /etc | wc -l\r" | ||
34 | expect { | ||
35 | timeout {puts "TESTING ERROR 1\n";exit} | ||
36 | "0" {puts "Debian\n"} | ||
37 | "1" {puts "Arch\n"} | ||
38 | |||
39 | } | ||
40 | |||
41 | after 100 | ||
42 | puts "\nall done\n" | ||
diff --git a/test/fs/private-etc-empty.profile b/test/fs/private-etc-empty.profile deleted file mode 100644 index 38aa8cd68..000000000 --- a/test/fs/private-etc-empty.profile +++ /dev/null | |||
@@ -1 +0,0 @@ | |||
1 | private-etc blablabla | ||
diff --git a/test/fs/private-etc.exp b/test/fs/private-etc.exp deleted file mode 100755 index 5edaacd25..000000000 --- a/test/fs/private-etc.exp +++ /dev/null | |||
@@ -1,72 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | # directory with ~ | ||
11 | send -- "firejail --private-etc=passwd,group,resolv.conf,X11\r" | ||
12 | expect { | ||
13 | timeout {puts "TESTING ERROR 1\n";exit} | ||
14 | "Child process initialized" | ||
15 | } | ||
16 | sleep 1 | ||
17 | |||
18 | send -- "LC_ALL=C ls -al /etc\r" | ||
19 | expect { | ||
20 | timeout {puts "TESTING ERROR 3\n";exit} | ||
21 | "X11" | ||
22 | } | ||
23 | expect { | ||
24 | timeout {puts "TESTING ERROR 4\n";exit} | ||
25 | "group" | ||
26 | } | ||
27 | expect { | ||
28 | timeout {puts "TESTING ERROR 5\n";exit} | ||
29 | "passwd" | ||
30 | } | ||
31 | expect { | ||
32 | timeout {puts "TESTING ERROR 6\n";exit} | ||
33 | "resolv.conf" | ||
34 | } | ||
35 | |||
36 | |||
37 | send -- "file /etc/shadow\r" | ||
38 | expect { | ||
39 | timeout {puts "TESTING ERROR 7\n";exit} | ||
40 | "No such file or directory" | ||
41 | } | ||
42 | after 100 | ||
43 | send -- "exit\r" | ||
44 | sleep 1 | ||
45 | |||
46 | send -- "firejail --private-etc=shadow\r" | ||
47 | expect { | ||
48 | timeout {puts "TESTING ERROR 8\n";exit} | ||
49 | "invalid file type" | ||
50 | } | ||
51 | after 100 | ||
52 | |||
53 | send -- "firejail --private-etc=\"bla;bla\"\r" | ||
54 | expect { | ||
55 | timeout {puts "TESTING ERROR 9\n";exit} | ||
56 | "is an invalid filename" | ||
57 | } | ||
58 | after 100 | ||
59 | |||
60 | send -- "firejail --private-etc=../bin/ls\r" | ||
61 | expect { | ||
62 | timeout {puts "TESTING ERROR 10\n";exit} | ||
63 | "is an invalid filename" | ||
64 | } | ||
65 | after 100 | ||
66 | |||
67 | |||
68 | |||
69 | |||
70 | |||
71 | after 100 | ||
72 | puts "\nall done\n" | ||
diff --git a/test/utils/trace.exp b/test/utils/trace.exp deleted file mode 100755 index 37c0b0f30..000000000 --- a/test/utils/trace.exp +++ /dev/null | |||
@@ -1,115 +0,0 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2018 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 30 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail --trace mkdir ttt\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Child process initialized" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "mkdir:mkdir ttt" | ||
18 | } | ||
19 | sleep 1 | ||
20 | |||
21 | send -- "firejail --trace rmdir ttt\r" | ||
22 | expect { | ||
23 | timeout {puts "TESTING ERROR 2\n";exit} | ||
24 | "Child process initialized" | ||
25 | } | ||
26 | expect { | ||
27 | timeout {puts "TESTING ERROR 3\n";exit} | ||
28 | "rmdir:rmdir ttt" | ||
29 | } | ||
30 | sleep 1 | ||
31 | |||
32 | send -- "firejail --trace touch ttt\r" | ||
33 | expect { | ||
34 | timeout {puts "TESTING ERROR 4\n";exit} | ||
35 | "Child process initialized" | ||
36 | } | ||
37 | expect { | ||
38 | timeout {puts "TESTING ERROR 5\n";exit} | ||
39 | "touch:open ttt" {puts "OK\n";} | ||
40 | "touch:open64 ttt" {puts "OK\n";} | ||
41 | } | ||
42 | sleep 1 | ||
43 | |||
44 | send -- "firejail --trace rm ttt\r" | ||
45 | expect { | ||
46 | timeout {puts "TESTING ERROR 6\n";exit} | ||
47 | "Child process initialized" | ||
48 | } | ||
49 | expect { | ||
50 | timeout {puts "TESTING ERROR 7\n";exit} | ||
51 | "rm:unlinkat ttt" | ||
52 | } | ||
53 | sleep 1 | ||
54 | |||
55 | send -- "firejail --trace wget -q debian.org\r" | ||
56 | #expect { | ||
57 | # timeout {puts "TESTING ERROR 8.1\n";exit} | ||
58 | # "Child process initialized" | ||
59 | #} | ||
60 | #expect { | ||
61 | # timeout {puts "TESTING ERROR 8.2\n";exit} | ||
62 | # "bash:open /dev/tty" {puts "OK\n";} | ||
63 | # "bash:open64 /dev/tty" {puts "OK\n";} | ||
64 | #} | ||
65 | expect { | ||
66 | timeout {puts "TESTING ERROR 8.3\n";exit} | ||
67 | "wget:fopen64 /etc/wgetrc" {puts "OK\n";} | ||
68 | "wget:fopen /etc/wgetrc" {puts "OK\n";} | ||
69 | } | ||
70 | expect { | ||
71 | timeout {puts "TESTING ERROR 8.4\n";exit} | ||
72 | "wget:fopen /etc/hosts" | ||
73 | } | ||
74 | expect { | ||
75 | timeout {puts "TESTING ERROR 8.5\n";exit} | ||
76 | "wget:connect" | ||
77 | } | ||
78 | expect { | ||
79 | timeout {puts "TESTING ERROR 8.6\n";exit} | ||
80 | "wget:fopen64 index.html" {puts "OK\n";} | ||
81 | "wget:fopen index.html" {puts "OK\n";} | ||
82 | "Parent is shutting down" {puts "OK\n";} | ||
83 | } | ||
84 | sleep 1 | ||
85 | |||
86 | send -- "firejail --trace rm index.html\r" | ||
87 | expect { | ||
88 | timeout {puts "TESTING ERROR 9\n";exit} | ||
89 | "Child process initialized" | ||
90 | } | ||
91 | expect { | ||
92 | timeout {puts "TESTING ERROR 10\n";exit} | ||
93 | "rm:unlinkat index.html" {puts "OK\n";} | ||
94 | "Parent is shutting down" {puts "OK\n";} | ||
95 | } | ||
96 | sleep 1 | ||
97 | |||
98 | send -- "firejail --trace\r" | ||
99 | expect { | ||
100 | timeout {puts "TESTING ERROR 11\n";exit} | ||
101 | "Child process initialized" | ||
102 | } | ||
103 | expect { | ||
104 | timeout {puts "TESTING ERROR 12\n";exit} | ||
105 | "bash:open /dev/tty" {puts "64bit\n"} | ||
106 | "bash:open64 /dev/tty" {puts "32bit\n"} | ||
107 | } | ||
108 | expect { | ||
109 | timeout {puts "TESTING ERROR 13\n";exit} | ||
110 | "bash:access /etc/terminfo/" {puts "debian\n"} | ||
111 | "bash:access /usr/share/terminfo/" {puts "arch\n"} | ||
112 | } | ||
113 | after 100 | ||
114 | |||
115 | puts "\nall done\n" | ||
diff --git a/test/utils/utils.sh b/test/utils/utils.sh index 82d00007b..f12698f0a 100755 --- a/test/utils/utils.sh +++ b/test/utils/utils.sh | |||
@@ -92,11 +92,6 @@ echo "TESTING: join3 (test/utils/join4.exp)" | |||
92 | echo "TESTING: join profile (test/utils/join-profile.exp)" | 92 | echo "TESTING: join profile (test/utils/join-profile.exp)" |
93 | ./join-profile.exp | 93 | ./join-profile.exp |
94 | 94 | ||
95 | echo "TESTING: trace (test/utils/trace.exp)" | ||
96 | rm -f index.html* | ||
97 | ./trace.exp | ||
98 | rm -f index.html* | ||
99 | |||
100 | echo "TESTING: top (test/utils/top.exp)" | 95 | echo "TESTING: top (test/utils/top.exp)" |
101 | ./top.exp | 96 | ./top.exp |
102 | 97 | ||