diff options
Diffstat (limited to 'test/environment')
-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 |
12 files changed, 0 insertions, 266 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 | ||