From e6b240b3fad7e489f7c91a8cf278ca1cbdc774a7 Mon Sep 17 00:00:00 2001 From: netblue30 Date: Fri, 16 Jan 2026 13:16:34 -0500 Subject: [PATCH] remove make test-sysutlis --- .github/workflows/test.yml | 1 - Makefile | 5 +- test/Makefile | 1 - test/sysutils/cpio.exp | 26 ------ test/sysutils/curl.exp | 34 -------- test/sysutils/dig.exp | 18 ----- test/sysutils/file.exp | 18 ----- test/sysutils/gzip.exp | 17 ---- test/sysutils/host.exp | 18 ----- test/sysutils/less.exp | 25 ------ test/sysutils/man.exp | 25 ------ test/sysutils/md5sum.exp | 21 ----- test/sysutils/nslookup.exp | 18 ----- test/sysutils/ping.exp | 23 ------ test/sysutils/sha512sum.exp | 21 ----- test/sysutils/strings.exp | 26 ------ test/sysutils/sysutils.sh | 155 ------------------------------------ test/sysutils/tar.exp | 46 ----------- test/sysutils/wget.exp | 34 -------- test/sysutils/whois.exp | 18 ----- test/sysutils/xz.exp | 29 ------- 21 files changed, 2 insertions(+), 577 deletions(-) delete mode 100755 test/sysutils/cpio.exp delete mode 100755 test/sysutils/curl.exp delete mode 100755 test/sysutils/dig.exp delete mode 100755 test/sysutils/file.exp delete mode 100755 test/sysutils/gzip.exp delete mode 100755 test/sysutils/host.exp delete mode 100755 test/sysutils/less.exp delete mode 100755 test/sysutils/man.exp delete mode 100755 test/sysutils/md5sum.exp delete mode 100755 test/sysutils/nslookup.exp delete mode 100755 test/sysutils/ping.exp delete mode 100755 test/sysutils/sha512sum.exp delete mode 100755 test/sysutils/strings.exp delete mode 100755 test/sysutils/sysutils.sh delete mode 100755 test/sysutils/tar.exp delete mode 100755 test/sysutils/wget.exp delete mode 100755 test/sysutils/whois.exp delete mode 100755 test/sysutils/xz.exp diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d0a227b05..adede5667 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -265,5 +265,4 @@ jobs: - run: make lab-setup - run: make test-fnetfilter - run: make test-fnettrace - - run: make test-sysutils - run: make test-network diff --git a/Makefile b/Makefile index 9fe930a80..a8600fa86 100644 --- a/Makefile +++ b/Makefile @@ -346,7 +346,6 @@ DISTFILES_TEST = \ test/network \ test/private-lib \ test/profiles \ - test/sysutils \ test/utils \ test/help @@ -419,7 +418,7 @@ sort-profiles: $(PROFILES_INC) $(PROFILES_PRO) # make test # -TESTS=chroot profiles capabilities firecfg network apparmor appimage apps sysutils utils environment filters fs fcopy fnettrace fnetfilter private-etc seccomp-extra +TESTS=chroot profiles capabilities firecfg network apparmor appimage apps utils environment filters fs fcopy fnettrace fnetfilter private-etc seccomp-extra TEST_TARGETS=$(patsubst %,test-%,$(TESTS)) $(TEST_TARGETS): @@ -431,7 +430,7 @@ $(TEST_TARGETS): lab-setup:; uname -r; ldd --version | grep GLIBC; pwd; whoami; ip addr show; cat /etc/resolv.conf; cat /etc/hosts; ls /etc .PHONY: test -test: lab-setup test-profiles test-fcopy test-fnettrace test-fnetfilter test-fs test-private-etc test-utils test-sysutils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-seccomp-extra +test: lab-setup test-profiles test-fcopy test-fnettrace test-fnetfilter test-fs test-private-etc test-utils test-environment test-apps test-apps-x11 test-apps-x11-xorg test-filters test-seccomp-extra echo "TEST COMPLETE" diff --git a/test/Makefile b/test/Makefile index 89855d082..002141a3c 100644 --- a/test/Makefile +++ b/test/Makefile @@ -18,7 +18,6 @@ clean: $(RM) environment/index.html* $(RM) environment/logfile* $(RM) environment/wget-log* - $(RM) sysutils/firejail_t* $(RM) utils/firejail-test-file* $(RM) utils/index.html* $(RM) utils/lstesting diff --git a/test/sysutils/cpio.exp b/test/sysutils/cpio.exp deleted file mode 100755 index f806e0d76..000000000 --- a/test/sysutils/cpio.exp +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "find /usr/share/doc/firejail | /bin/cpio -ov > firejail_t1\r" -sleep 1 - -send -- "find /usr/share/doc/firejail | firejail /bin/cpio -ov > firejail_t2\r" -sleep 1 - -send -- "diff -s firejail_t1 firejail_t2\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "firejail_t1 and firejail_t2 are identical" -} - -send -- "rm firejail_t*\r" -sleep 1 - - -puts "\nall done\n" diff --git a/test/sysutils/curl.exp b/test/sysutils/curl.exp deleted file mode 100755 index cd682d9a4..000000000 --- a/test/sysutils/curl.exp +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "rm index.html*\r" -after 500 - -send -- "firejail --ignore=quiet curl -s -o index.html debian.org\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" -} -expect { - timeout {puts "TESTING ERROR 2\n";exit} - "Parent is shutting down" -} -after 100 - -send -- "ls -l index.html\r" -expect { - timeout {puts "TESTING ERROR 3\n";exit} - "No such file or directory" {puts "TESTING ERROR 4\n";exit} - "rw" -} -after 100 -send -- "rm index.html*\r" -after 500 - -puts "\nall done\n" diff --git a/test/sysutils/dig.exp b/test/sysutils/dig.exp deleted file mode 100755 index eb23f9d79..000000000 --- a/test/sysutils/dig.exp +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail dig +timeout=1 +retry=0 dns.quad9.net\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "no servers could be reached" {puts "no network connectivity!\n";exit} - "NXDOMAIN" {puts "not found\n";exit} - "ANSWER SECTION" -} -after 100 -puts "\nall done\n" diff --git a/test/sysutils/file.exp b/test/sysutils/file.exp deleted file mode 100755 index 4c2ec3dca..000000000 --- a/test/sysutils/file.exp +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "echo 'test string for firejail test' > /tmp/firejail_test.txt; firejail file /tmp/firejail_test.txt\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "ASCII text" -} -send -- "rm /tmp/firejail_test.txt\r" -sleep 1 - -puts "\nall done\n" diff --git a/test/sysutils/gzip.exp b/test/sysutils/gzip.exp deleted file mode 100755 index bd967de7e..000000000 --- a/test/sysutils/gzip.exp +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail gzip -c ../../mkdeb.sh | firejail gunzip -c\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "This file is part of Firejail project" -} -after 500 - -puts "\nall done\n" diff --git a/test/sysutils/host.exp b/test/sysutils/host.exp deleted file mode 100755 index 70a396543..000000000 --- a/test/sysutils/host.exp +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail host -W 1 -R 0 dns.quad9.net\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "no servers could be reached" {puts "no network connectivity!\n";exit} - "NXDOMAIN" {puts "not found\n";exit} - "has address" -} -after 100 -puts "\nall done\n" diff --git a/test/sysutils/less.exp b/test/sysutils/less.exp deleted file mode 100755 index a29891deb..000000000 --- a/test/sysutils/less.exp +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "rm -f /tmp/tt\r" -after 500 - -send -- "firejail less sysutils.sh > /tmp/t\r" -sleep 1 - -send -- "cat /tmp/t | grep Authors\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "Firejail Authors" -} -after 100 - -send -- "rm -f /tmp/t\r" -after 500 -puts "\nall done\n" diff --git a/test/sysutils/man.exp b/test/sysutils/man.exp deleted file mode 100755 index 000febf44..000000000 --- a/test/sysutils/man.exp +++ /dev/null @@ -1,25 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "rm -f /tmp/t\r" -after 500 - -send -- "firejail /usr/bin/man firecfg > /tmp/t\r" -sleep 1 - -send -- "cat /tmp/t\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "NAME" -} -after 100 - -send -- "rm -f /tmp/t\r" -after 500 -puts "\nall done\n" diff --git a/test/sysutils/md5sum.exp b/test/sysutils/md5sum.exp deleted file mode 100755 index 33ec7ba4c..000000000 --- a/test/sysutils/md5sum.exp +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail md5sum ../../COPYING\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "b234ee" -} -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "COPYING" -} - -after 500 -puts "\nall done\n" diff --git a/test/sysutils/nslookup.exp b/test/sysutils/nslookup.exp deleted file mode 100755 index 298756945..000000000 --- a/test/sysutils/nslookup.exp +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail nslookup -timeout=1 -retry=0 dns.quad9.net\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "no servers could be reached" {puts "no network connectivity!\n";exit} - "NXDOMAIN" {puts "not found\n";exit} - "Address" -} -after 100 -puts "\nall done\n" diff --git a/test/sysutils/ping.exp b/test/sysutils/ping.exp deleted file mode 100755 index 9a32ad3b4..000000000 --- a/test/sysutils/ping.exp +++ /dev/null @@ -1,23 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "ping -c 3 yahoo.com\r" -expect { - timeout {puts "TESTING SKIP: no internet connection\n";exit} - "3 packets transmitted, 3 received" -} -after 100 - -send -- "firejail ping -c 3 yahoo.com\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "3 packets transmitted, 3 received" -} -after 100 -puts "\nall done\n" diff --git a/test/sysutils/sha512sum.exp b/test/sysutils/sha512sum.exp deleted file mode 100755 index 1a2cec73d..000000000 --- a/test/sysutils/sha512sum.exp +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail sha512sum ../../COPYING\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "aee80b1f" -} -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "COPYING" -} - -after 500 -puts "\nall done\n" diff --git a/test/sysutils/strings.exp b/test/sysutils/strings.exp deleted file mode 100755 index c1277826b..000000000 --- a/test/sysutils/strings.exp +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "/usr/bin/strings /usr/bin/firejail > firejail_t1\r" -sleep 1 - -send -- "firejail /usr/bin/strings /usr/bin/firejail > firejail_t2\r" -sleep 1 - -send -- "diff -s firejail_t1 firejail_t2 | head\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "firejail_t1 and firejail_t2 are identical" -} - -send -- "rm firejail_t*\r" -sleep 1 - - -puts "\nall done\n" diff --git a/test/sysutils/sysutils.sh b/test/sysutils/sysutils.sh deleted file mode 100755 index a732faea6..000000000 --- a/test/sysutils/sysutils.sh +++ /dev/null @@ -1,155 +0,0 @@ -#!/bin/bash -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -export MALLOC_CHECK_=3 -export MALLOC_PERTURB_=$(($RANDOM % 255 + 1)) -export LC_ALL=C - -if command -v gzip -then - echo "TESTING: gzip" - ./gzip.exp -else - echo "TESTING SKIP: md5sum not found" -fi - -if command -v md5sum -then - echo "TESTING: md5sum" - ./md5sum.exp -else - echo "TESTING SKIP: md5sum not found" -fi - -if command -v sha512sum -then - echo "TESTING: sha512sum" - ./sha512sum.exp -else - echo "TESTING SKIP: sha512sum not found" -fi - -if command -v cpio -then - echo "TESTING: cpio" - ./cpio.exp -else - echo "TESTING SKIP: cpio not found" -fi - -if command -v gzip -then - echo "TESTING: gzip" - ./gzip.exp -else - echo "TESTING SKIP: gzip not found" -fi - -if command -v xz -then - echo "TESTING: xz" - ./xz.exp -else - echo "TESTING SKIP: xz not found" -fi - -if command -v less -then - echo "TESTING: less" - ./less.exp -else - echo "TESTING SKIP: less not found" -fi - -if command -v file -then - echo "TESTING: file" - ./file.exp -else - echo "TESTING SKIP: file not found" -fi - -if command -v tar -then - echo "TESTING: tar" - ./tar.exp -else - echo "TESTING SKIP: tar not found" -fi - -if command -v ping -then - echo "TESTING: ping" - ./ping.exp -else - echo "TESTING SKIP: ping not found" -fi - -if command -v dig -then - echo "TESTING: dig" - ./dig.exp -else - echo "TESTING SKIP: dig not found" -fi - -if command -v host -then - echo "TESTING: host" - ./host.exp -else - echo "TESTING SKIP: host not found" -fi - -if command -v nslookup -then - echo "TESTING: nslookup" - ./host.exp -else - echo "TESTING SKIP: nslookup not found" -fi - -if command -v man -then - echo "TESTING: FIXME: man" - #./man.exp # FIXME: Broken in CI (see #6949) -else - echo "TESTING SKIP: man not found" -fi - -if command -v wget -then - echo "TESTING: FIXME: wget" - #./wget.exp # FIXME: Broken in CI -else - echo "TESTING SKIP: wget not found" -fi - -if command -v curl -then - echo "TESTING: curl" - ./curl.exp -else - echo "TESTING SKIP: curl not found" -fi - -if command -v strings -then - echo "TESTING: FIXME: strings" - #./strings.exp # FIXME: Broken since commit 3077b2d1f -else - echo "TESTING SKIP: strings not found" -fi - -if command -v whois -then - echo "TESTING: whois" - ./whois.exp -else - echo "TESTING SKIP: whois not found" -fi - -cd ../../ -./mkgcov.sh diff --git a/test/sysutils/tar.exp b/test/sysutils/tar.exp deleted file mode 100755 index c79bf072d..000000000 --- a/test/sysutils/tar.exp +++ /dev/null @@ -1,46 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail /bin/tar -cjvf firejail_t2 /usr/share/doc/firejail\r" -expect { - timeout {puts "TESTING ERROR 1.1\n";exit} - "Error" {puts "TESTING ERROR 1.2\n";exit} - "/usr/share/doc/firejail/README" -} -after 100 - -send -- "stat -c '|%s|' firejail_t2; uname -s\r" -expect { - timeout {puts "TESTING ERROR 2.1\n";exit} - "|0|" {puts "TESTING ERROR 2.2\n";exit} - "Linux" -} -sleep 1 - -send -- "firejail /bin/tar --compare --file=firejail_t2 -C / | wc\r" -expect { - timeout {puts "TESTING ERROR 3.1\n";exit} - "This does not look like a tar archive" {puts "TESTING ERROR 3.2\n"; exit} - " 0 0 0" -} -sleep 1 -send -- "/bin/tar --compare --file=firejail_t2 -C / | wc\r" -expect { - timeout {puts "TESTING ERROR 4.1\n";exit} - "This does not look like a tar archive" {puts "TESTING ERROR 4.2\n"; exit} - " 0 0 0" -} -sleep 1 - - -send -- "rm firejail_t*\r" -sleep 1 - - -puts "\nall done\n" diff --git a/test/sysutils/wget.exp b/test/sysutils/wget.exp deleted file mode 100755 index dc8099750..000000000 --- a/test/sysutils/wget.exp +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 30 -spawn $env(SHELL) -match_max 100000 - -send -- "rm index.html*\r" -after 500 - -send -- "firejail --ignore=quiet wget -q debian.org\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "Child process initialized" -} -expect { - timeout {puts "TESTING ERROR 2\n";exit} - "Parent is shutting down" -} -after 100 - -send -- "ls -l index.html\r" -expect { - timeout {puts "TESTING ERROR 3\n";exit} - "No such file or directory" {puts "TESTING ERROR 4\n";exit} - "rw" -} -after 100 -send -- "rm index.html*\r" -after 500 - -puts "\nall done\n" diff --git a/test/sysutils/whois.exp b/test/sysutils/whois.exp deleted file mode 100755 index e07bd3bce..000000000 --- a/test/sysutils/whois.exp +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 10 -spawn $env(SHELL) -match_max 100000 - -send -- "firejail whois debian.org\r" -expect { - timeout {puts "TESTING ERROR 0\n";exit} - "Domain Name" {puts "testing ok\n"} - "Connection refused" {puts "TESTING SKIP: connection refused\n"} -} - -after 100 -puts "\nall done\n" diff --git a/test/sysutils/xz.exp b/test/sysutils/xz.exp deleted file mode 100755 index 2f4bb4bb1..000000000 --- a/test/sysutils/xz.exp +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/expect -f -# This file is part of Firejail project -# Copyright (C) 2014-2026 Firejail Authors -# License GPL v2 - -set timeout 60 -spawn $env(SHELL) -match_max 100000 - -send -- "/usr/bin/xz -c /usr/bin/firejail > firejail_t1\r" -sleep 1 - -send -- "firejail /usr/bin/xz -c /usr/bin/firejail > firejail_t2\r" -sleep 1 - -send -- "md5sum firejail_t1 firejail_t2; ls -l firejail_t1 firejail_t2\r" -sleep 1 - -send -- "diff -s firejail_t1 firejail_t2\r" -expect { - timeout {puts "TESTING ERROR 1\n";exit} - "firejail_t1 and firejail_t2 are identical" -} - -send -- "rm firejail_t*\r" -sleep 1 - - -puts "\nall done\n"