diff options
Diffstat (limited to 'test/sysutils')
-rwxr-xr-x | test/sysutils/cpio.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/curl.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/dig.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/file.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/gzip.exp | 18 | ||||
-rwxr-xr-x | test/sysutils/host.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/less.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/man.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/md5sum.exp | 21 | ||||
-rwxr-xr-x | test/sysutils/nslookup.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/ping.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/sha512sum.exp | 21 | ||||
-rwxr-xr-x | test/sysutils/strings.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/sysutils.sh | 34 | ||||
-rwxr-xr-x | test/sysutils/tar.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/wget.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/whois.exp | 18 | ||||
-rwxr-xr-x | test/sysutils/xz.exp | 2 | ||||
-rwxr-xr-x | test/sysutils/xzdec.exp | 2 |
19 files changed, 113 insertions, 27 deletions
diff --git a/test/sysutils/cpio.exp b/test/sysutils/cpio.exp index e4ab77525..f1ae1f83d 100755 --- a/test/sysutils/cpio.exp +++ b/test/sysutils/cpio.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/curl.exp b/test/sysutils/curl.exp index 29c9883a4..31f44bf54 100755 --- a/test/sysutils/curl.exp +++ b/test/sysutils/curl.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/dig.exp b/test/sysutils/dig.exp index bd5ccbb5c..38acabeed 100755 --- a/test/sysutils/dig.exp +++ b/test/sysutils/dig.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/file.exp b/test/sysutils/file.exp index dcc253dad..b302c8be2 100755 --- a/test/sysutils/file.exp +++ b/test/sysutils/file.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/gzip.exp b/test/sysutils/gzip.exp index 75b51694c..1588262e2 100755 --- a/test/sysutils/gzip.exp +++ b/test/sysutils/gzip.exp | |||
@@ -1,26 +1,20 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
7 | spawn $env(SHELL) | 7 | spawn $env(SHELL) |
8 | match_max 100000 | 8 | match_max 100000 |
9 | 9 | ||
10 | send -- "/bin/gzip -c /usr/bin/firejail > firejail_t1\r" | 10 | send -- "rm index.html*\r" |
11 | sleep 1 | 11 | after 500 |
12 | 12 | ||
13 | send -- "firejail /bin/gzip -c /usr/bin/firejail > firejail_t2\r" | 13 | send -- "firejail gzip -c ../../mkdeb.sh | firejail gunzip -c\r" |
14 | sleep 1 | ||
15 | |||
16 | send -- "diff -s firejail_t1 firejail_t2\r" | ||
17 | expect { | 14 | expect { |
18 | timeout {puts "TESTING ERROR 1\n";exit} | 15 | timeout {puts "TESTING ERROR 1\n";exit} |
19 | "firejail_t1 and firejail_t2 are identical" | 16 | "This file is part of Firejail project" |
20 | } | 17 | } |
21 | 18 | after 500 | |
22 | send -- "rm firejail_t*\r" | ||
23 | sleep 1 | ||
24 | |||
25 | 19 | ||
26 | puts "\nall done\n" | 20 | puts "\nall done\n" |
diff --git a/test/sysutils/host.exp b/test/sysutils/host.exp index 7fe3ddfa4..5c7d3f062 100755 --- a/test/sysutils/host.exp +++ b/test/sysutils/host.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/less.exp b/test/sysutils/less.exp index 7bbd76942..9e19af83a 100755 --- a/test/sysutils/less.exp +++ b/test/sysutils/less.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/man.exp b/test/sysutils/man.exp index c569653c6..f4fc5aa2c 100755 --- a/test/sysutils/man.exp +++ b/test/sysutils/man.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/md5sum.exp b/test/sysutils/md5sum.exp new file mode 100755 index 000000000..24567ee36 --- /dev/null +++ b/test/sysutils/md5sum.exp | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail md5sum ../../COPYING\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "b234ee" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "COPYING" | ||
18 | } | ||
19 | |||
20 | after 500 | ||
21 | puts "\nall done\n" | ||
diff --git a/test/sysutils/nslookup.exp b/test/sysutils/nslookup.exp index 2a99441d9..249cfe565 100755 --- a/test/sysutils/nslookup.exp +++ b/test/sysutils/nslookup.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/ping.exp b/test/sysutils/ping.exp index dd6073234..dc50af38e 100755 --- a/test/sysutils/ping.exp +++ b/test/sysutils/ping.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/sha512sum.exp b/test/sysutils/sha512sum.exp new file mode 100755 index 000000000..8c1f81417 --- /dev/null +++ b/test/sysutils/sha512sum.exp | |||
@@ -0,0 +1,21 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail sha512sum ../../COPYING\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "aee80b1f" | ||
14 | } | ||
15 | expect { | ||
16 | timeout {puts "TESTING ERROR 1\n";exit} | ||
17 | "COPYING" | ||
18 | } | ||
19 | |||
20 | after 500 | ||
21 | puts "\nall done\n" | ||
diff --git a/test/sysutils/strings.exp b/test/sysutils/strings.exp index 47b75accc..f440a7674 100755 --- a/test/sysutils/strings.exp +++ b/test/sysutils/strings.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh index bab243c4b..34acca07d 100755 --- a/test/sysutils/sysutils.sh +++ b/test/sysutils/sysutils.sh | |||
@@ -1,12 +1,36 @@ | |||
1 | #!/bin/bash | 1 | #!/bin/bash |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | export MALLOC_CHECK_=3 | 6 | export MALLOC_CHECK_=3 |
7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) | 7 | export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) |
8 | export LC_ALL=C | 8 | export LC_ALL=C |
9 | 9 | ||
10 | if command -v gzip | ||
11 | then | ||
12 | echo "TESTING: gzip" | ||
13 | ./gzip.exp | ||
14 | else | ||
15 | echo "TESTING SKIP: md5sum not found" | ||
16 | fi | ||
17 | |||
18 | if command -v md5sum | ||
19 | then | ||
20 | echo "TESTING: md5sum" | ||
21 | ./md5sum.exp | ||
22 | else | ||
23 | echo "TESTING SKIP: md5sum not found" | ||
24 | fi | ||
25 | |||
26 | if command -v sha512sum | ||
27 | then | ||
28 | echo "TESTING: sha512sum" | ||
29 | ./sha512sum.exp | ||
30 | else | ||
31 | echo "TESTING SKIP: sha512sum not found" | ||
32 | fi | ||
33 | |||
10 | if command -v cpio | 34 | if command -v cpio |
11 | then | 35 | then |
12 | echo "TESTING: cpio" | 36 | echo "TESTING: cpio" |
@@ -127,3 +151,11 @@ else | |||
127 | echo "TESTING SKIP: strings not found" | 151 | echo "TESTING SKIP: strings not found" |
128 | fi | 152 | fi |
129 | 153 | ||
154 | if command -v whois | ||
155 | then | ||
156 | echo "TESTING: whois" | ||
157 | ./whois.exp | ||
158 | else | ||
159 | echo "TESTING SKIP: whois not found" | ||
160 | fi | ||
161 | |||
diff --git a/test/sysutils/tar.exp b/test/sysutils/tar.exp index ed68179f9..8f4c9f565 100755 --- a/test/sysutils/tar.exp +++ b/test/sysutils/tar.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/wget.exp b/test/sysutils/wget.exp index c6d2765c7..7f994ff81 100755 --- a/test/sysutils/wget.exp +++ b/test/sysutils/wget.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |
diff --git a/test/sysutils/whois.exp b/test/sysutils/whois.exp new file mode 100755 index 000000000..932a46282 --- /dev/null +++ b/test/sysutils/whois.exp | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/usr/bin/expect -f | ||
2 | # This file is part of Firejail project | ||
3 | # Copyright (C) 2014-2023 Firejail Authors | ||
4 | # License GPL v2 | ||
5 | |||
6 | set timeout 10 | ||
7 | spawn $env(SHELL) | ||
8 | match_max 100000 | ||
9 | |||
10 | send -- "firejail whois debian.org\r" | ||
11 | expect { | ||
12 | timeout {puts "TESTING ERROR 0\n";exit} | ||
13 | "Domain Name" {puts "testing ok\n"} | ||
14 | "Connection refused" {puts "TESTING SKIP: connection refused\n"} | ||
15 | } | ||
16 | |||
17 | after 100 | ||
18 | puts "\nall done\n" | ||
diff --git a/test/sysutils/xz.exp b/test/sysutils/xz.exp index 9ee85cde4..bbe05ea19 100755 --- a/test/sysutils/xz.exp +++ b/test/sysutils/xz.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 60 | 6 | set timeout 60 |
diff --git a/test/sysutils/xzdec.exp b/test/sysutils/xzdec.exp index 1b525e3bd..62cc1c225 100755 --- a/test/sysutils/xzdec.exp +++ b/test/sysutils/xzdec.exp | |||
@@ -1,6 +1,6 @@ | |||
1 | #!/usr/bin/expect -f | 1 | #!/usr/bin/expect -f |
2 | # This file is part of Firejail project | 2 | # This file is part of Firejail project |
3 | # Copyright (C) 2014-2022 Firejail Authors | 3 | # Copyright (C) 2014-2023 Firejail Authors |
4 | # License GPL v2 | 4 | # License GPL v2 |
5 | 5 | ||
6 | set timeout 10 | 6 | set timeout 10 |