aboutsummaryrefslogtreecommitdiffstats
path: root/test/sysutils
diff options
context:
space:
mode:
Diffstat (limited to 'test/sysutils')
-rwxr-xr-xtest/sysutils/cpio.exp2
-rwxr-xr-xtest/sysutils/curl.exp2
-rwxr-xr-xtest/sysutils/dig.exp2
-rwxr-xr-xtest/sysutils/file.exp2
-rwxr-xr-xtest/sysutils/gzip.exp18
-rwxr-xr-xtest/sysutils/host.exp2
-rwxr-xr-xtest/sysutils/less.exp2
-rwxr-xr-xtest/sysutils/man.exp2
-rwxr-xr-xtest/sysutils/md5sum.exp21
-rwxr-xr-xtest/sysutils/nslookup.exp2
-rwxr-xr-xtest/sysutils/ping.exp2
-rwxr-xr-xtest/sysutils/sha512sum.exp21
-rwxr-xr-xtest/sysutils/strings.exp2
-rwxr-xr-xtest/sysutils/sysutils.sh34
-rwxr-xr-xtest/sysutils/tar.exp2
-rwxr-xr-xtest/sysutils/wget.exp2
-rwxr-xr-xtest/sysutils/whois.exp18
-rwxr-xr-xtest/sysutils/xz.exp2
-rwxr-xr-xtest/sysutils/xzdec.exp2
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
6set timeout 10 6set 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
6set timeout 10 6set 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
6set timeout 10 6set 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
6set timeout 10 6set 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
6set timeout 10 6set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "/bin/gzip -c /usr/bin/firejail > firejail_t1\r" 10send -- "rm index.html*\r"
11sleep 1 11after 500
12 12
13send -- "firejail /bin/gzip -c /usr/bin/firejail > firejail_t2\r" 13send -- "firejail gzip -c ../../mkdeb.sh | firejail gunzip -c\r"
14sleep 1
15
16send -- "diff -s firejail_t1 firejail_t2\r"
17expect { 14expect {
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 18after 500
22send -- "rm firejail_t*\r"
23sleep 1
24
25 19
26puts "\nall done\n" 20puts "\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
6set timeout 10 6set 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
6set timeout 10 6set 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
6set timeout 10 6set 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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail md5sum ../../COPYING\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "b234ee"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "COPYING"
18}
19
20after 500
21puts "\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
6set timeout 10 6set 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
6set timeout 10 6set 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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail sha512sum ../../COPYING\r"
11expect {
12 timeout {puts "TESTING ERROR 0\n";exit}
13 "aee80b1f"
14}
15expect {
16 timeout {puts "TESTING ERROR 1\n";exit}
17 "COPYING"
18}
19
20after 500
21puts "\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
6set timeout 10 6set 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
6export MALLOC_CHECK_=3 6export MALLOC_CHECK_=3
7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) 7export MALLOC_PERTURB_=$(($RANDOM % 255 + 1))
8export LC_ALL=C 8export LC_ALL=C
9 9
10if command -v gzip
11then
12 echo "TESTING: gzip"
13 ./gzip.exp
14else
15 echo "TESTING SKIP: md5sum not found"
16fi
17
18if command -v md5sum
19then
20 echo "TESTING: md5sum"
21 ./md5sum.exp
22else
23 echo "TESTING SKIP: md5sum not found"
24fi
25
26if command -v sha512sum
27then
28 echo "TESTING: sha512sum"
29 ./sha512sum.exp
30else
31 echo "TESTING SKIP: sha512sum not found"
32fi
33
10if command -v cpio 34if command -v cpio
11then 35then
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"
128fi 152fi
129 153
154if command -v whois
155then
156 echo "TESTING: whois"
157 ./whois.exp
158else
159 echo "TESTING SKIP: whois not found"
160fi
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
6set timeout 10 6set 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
6set timeout 10 6set 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
6set timeout 10
7spawn $env(SHELL)
8match_max 100000
9
10send -- "firejail whois debian.org\r"
11expect {
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
17after 100
18puts "\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
6set timeout 60 6set 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
6set timeout 10 6set timeout 10