diff options
Diffstat (limited to 'test/sysutils')
-rwxr-xr-x | test/sysutils/md5sum.exp | 21 | ||||
-rwxr-xr-x | test/sysutils/sha512sum.exp | 21 | ||||
-rwxr-xr-x | test/sysutils/sysutils.sh | 16 |
3 files changed, 58 insertions, 0 deletions
diff --git a/test/sysutils/md5sum.exp b/test/sysutils/md5sum.exp new file mode 100755 index 000000000..ab2482808 --- /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-2022 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/sha512sum.exp b/test/sysutils/sha512sum.exp new file mode 100755 index 000000000..2a88fef83 --- /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-2022 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/sysutils.sh b/test/sysutils/sysutils.sh index a1aaa80a7..3c035c69c 100755 --- a/test/sysutils/sysutils.sh +++ b/test/sysutils/sysutils.sh | |||
@@ -7,6 +7,22 @@ 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 md5sum | ||
11 | then | ||
12 | echo "TESTING: md5sum" | ||
13 | ./md5sum.exp | ||
14 | else | ||
15 | echo "TESTING SKIP: md5sum not found" | ||
16 | fi | ||
17 | |||
18 | if command -v sha512sum | ||
19 | then | ||
20 | echo "TESTING: sha512sum" | ||
21 | ./sha512sum.exp | ||
22 | else | ||
23 | echo "TESTING SKIP: sha512sum not found" | ||
24 | fi | ||
25 | |||
10 | if command -v cpio | 26 | if command -v cpio |
11 | then | 27 | then |
12 | echo "TESTING: cpio" | 28 | echo "TESTING: cpio" |