aboutsummaryrefslogtreecommitdiffstats
path: root/test
Commit message (Collapse)AuthorAge
* tests: fix broken rm in gzip.expLibravatar Kelvin M. Klann2024-04-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This amends commit 29da82d08 ("private-etc: kdiff3, gzip, gunzip, tar etc", 2023-02-10). This is causing CI to fail, as "index.html" has nothing to do with gzip.exp[1]: ##[group]Run make test-sysutils make test-sysutils shell: /usr/bin/bash -e {0} env: SHELL: /bin/bash ##[endgroup] make -C test sysutils make[1]: Entering directory '/home/runner/work/firejail/firejail/test' cd sysutils && ./sysutils.sh 2>&1 | tee sysutils.log /usr/bin/gzip TESTING: gzip spawn /bin/bash rm index.html* runner@fv-az1391-790:~/work/firejail/firejail/test/sysutils$ rm index.html* rm: cannot remove 'index.html*': No such file or directory runner@fv-az1391-790:~/work/firejail/firejail/test/sysutils$ <irejail gzip -c ../../mkdeb.sh | firejail gunzip -c TESTING ERROR 1 [1] https://github.com/netblue30/firejail/actions/runs/8739405468/job/23982517624:
* build: standardize ./configure argumentsLibravatar Kelvin M. Klann2024-02-29
| | | | | | | | | | | | | | For consistency and to make it clearer where jobs differ (for example, to see where `--enable-analyzer` is used). Changes: * Always use --prefix=/usr and --enable-fatal-warnings (except in the Alpine job due to current warnings; see #6224) * Use the same argument order Note: mkdeb.sh and platform/rpm/mkrpm.sh already pass `--prefix=/usr` to ./configure.
* build: standardize parallel make argumentsLibravatar Kelvin M. Klann2024-02-29
| | | | | | | | | | | Currently the number of make jobs used for the default build target are hardcoded and the value used varies across files. For consistency (and potentially better performance), use `make -j "$(nproc)"` everywhere that `make -j` is currently used. Kind of relates to commit 500d8f2d6 ("ci: run make in parallel where applicable", 2023-08-14) / PR #5960.
* build: prevent make clean error if compile.sh --clean failsLibravatar Kelvin M. Klann2024-02-07
| | | | | | | | | | | | | | | | | | | | | In the `debian_ci` job in .gitlab-ci.yml, dpkg-deb calls `make distclean` before calling ./configure, which makes `make clean` fail due to test/compile/compile.sh not being able to source config.mk (which is created by ./configure): dpkg-source -i -I --before-build . [...] dh_auto_clean make -j2 distclean make[1]: Entering directory '/builds/Firejail/firejail_ci' error: run ./configure to generate config.mk [...] cd compile && ./compile.sh --clean ./compile.sh: line 15: ./../../config.sh: No such file or directory make[2]: *** [Makefile:24: clean] Error 1 This amends commit 152a21f15 ("build: simplify clean target", 2023-07-29) / PR #6186.
* build: simplify clean targetLibravatar Kelvin M. Klann2024-01-31
| | | | Move some clean commands into more relevant makefiles.
* update copyright 2024Libravatar netblue302024-01-12
|
* tests: disable broken wget tests in utils/sysutilsLibravatar Kelvin M. Klann2023-08-28
| | | | | | | | | | | | | | | | | | | | | They are taking longer than the 30s timeout[1] [2]: runner@fv-az246-621:~/work/firejail/firejail/test/sysutils$ <ysutils$ firejail --ignore=quiet wget -q debian.org Reading profile /etc/firejail/wget.profile [...] Child process initialized in 115.54 ms TESTING ERROR 2 runner@fv-az1234-541:~/work/firejail/firejail/test/utils$ <irejail --build wget --output-document=~ debian.org [...] Resolving www.debian.org (www.debian.org)... 128.31.0.62 Connecting to www.debian.org (www.debian.org)|128.31.0.62|:443... connected. TESTING ERROR 13 [1] https://github.com/kmk3/firejail/actions/runs/6005119423/job/16287436840 [2] https://github.com/kmk3/firejail/actions/runs/6005314148/job/16287794321
* tests: disable wget test in utils/trace.expLibravatar Kelvin M. Klann2023-08-28
| | | | | | | | | | | | | | | | | | | | It is apparently getting in the way of the rm test[1]: runner@fv-az1417-728:~/work/firejail/firejail/test/utils$ <ail/test/utils$ firejail --trace wget -q debian.org 5:wget:exec /usr/local/bin/wget:0 5:wget:stat64 /etc/wgetrc:0 5:wget:fopen64 /etc/wgetrc:0x561585600510 5:wget:stat64 /home/runner/.wgetrc:-1 OK [...] firejail --trace rm index.html 5:wget:connect 4 128.31.0.62 port 443:0 [...] 5:wget:stat64 /home/runner/.wget-hsts:0 runner@fv-az1417-728:~/work/firejail/firejail/test/utils$ TESTING ERROR 9 [1] https://github.com/kmk3/firejail/actions/runs/6004405511/job/16284920616
* tests: fix wget test in utils/trace.expLibravatar Kelvin M. Klann2023-08-28
| | | | | | | | | | | | | | | | | | | | This should fix the following error[1]: runner@fv-az1230-523:~/work/firejail/firejail/test/utils$ <ail/test/utils$ firejail --trace wget -q debian.org [...] 5:wget:stat64 index.html:-1 5:wget:stat64 index.html:-1 5:wget:stat64 /home/runner/.netrc:-1 5:wget:socket AF_INET SOCK_STREAM IPPROTO_IP:4 5:wget:connect 4 151.101.66.132 port 80:0 5:wget:stat64 index.html:-1 5:wget:stat64 index.html:-1 5:wget:stat64 index.html:-1 [...] TESTING ERROR 8.6 [1] https://github.com/kmk3/firejail/actions/runs/6004266783/job/16284476671
* tests: increase the timeouts in wget.exp and build.expLibravatar Kelvin M. Klann2023-08-28
| | | | | | | | | | | | | | | | | | | | To try to fix the following errors[1] [2]: runner@fv-az298-480:~/work/firejail/firejail/test/utils$ <irejail --build wget --output-document=~ debian.org [...] Resolving www.debian.org (www.debian.org)... 128.31.0.62 Connecting to www.debian.org (www.debian.org)|128.31.0.62|:443... connected. TESTING ERROR 13 runner@fv-az305-745:~/work/firejail/firejail/test/sysutils$ <ysutils$ firejail --ignore=quiet wget -q debian.org [...] Child process initialized in 106.89 ms TESTING ERROR 2 [1] https://github.com/netblue30/firejail/actions/runs/5996420917/job/16278071977?pr=5979 [2] https://github.com/netblue30/firejail/actions/runs/5996420917/job/16278071219?pr=5979
* tests: properly fix fs/kmsg testLibravatar Kelvin M. Klann2023-08-23
| | | | | | | | | | | | It was broken likely due to `private-dev` being added to default.profile on commit 307dad542 ("adding private-tmp and private-dev to default.profile", 2023-08-20). So ignore `private-dev` in the test and make sure to run the tests when default.profile changes. This amends commit 75cefd5b1 ("tests: fix error when /dev/kmsg is missing", 2023-08-21).
* test: disable broken sysutils strings testLibravatar Kelvin M. Klann2023-08-23
| | | | | | | | | | And limit the output of `diff` in the test to avoid logging thousands of lines of a hexdump. Likely broken by commit 3077b2d1f ("update disable-devel.inc", 2023-08-22)[1]. [1] https://github.com/netblue30/firejail/actions/runs/5945120115/job/16123622451
* tests: fix error when /dev/kmsg is missingLibravatar Kelvin M. Klann2023-08-21
| | | | | | | This is breaking test-fs in CI since at least commit f37cd57cd ("disable all /bin/dpkg* programs in disable-common.inc", 2023-08-20)[1]. [1] https://github.com/netblue30/firejail/actions/runs/5918495917/job/16062400120
* build: fix TARNAME/VERSION variables in compile.shLibravatar Kelvin M. Klann2023-08-12
| | | | | | | | | | | | | This fixes the following errors: $ make clean [...] cd test/compile; ./compile.sh --clean; cd ../.. ./compile.sh: line 55: TARNAME: command not found ./compile.sh: line 55: VERSION: command not found This amends commit 200f389ed ("build: use config.sh in more scripts", 2023-07-28) / PR #5927.
* build: use config.sh in more scriptsLibravatar Kelvin M. Klann2023-07-28
| | | | | | | This removes the need to manually pass variables such as `$(TARNAME)` and `$(VERSION)` to shell scripts in the root Makefile. Relates to #5140.
* build: fix shellcheck issues in mkrpm.sh/compile.shLibravatar Kelvin M. Klann2023-07-28
|
* build: remove unnecessary distclean targetsLibravatar Kelvin M. Klann2023-07-20
| | | | This also fixes the duplicate execution of the "clean" targets.
* modif: drop deprecated 'shell' option references (#5894)Libravatar glitsj162023-07-19
| | | | | | | | | | | | The `shell` option has been removed. Remove stale references. This does NOT remove `shell none`-related code comments in: - src/firejail/fs_lib.c (L433-L441) - src/firejail/join.c (L415-L417) Relates to #5196. Suggested by #5891.
* Improve errExit error messagesLibravatar Kelvin M. Klann2023-06-28
| | | | | | | | | | | | | | | | | | | | | | | Changes: * Move msg to the end of errExit (right before perror(3p)) * Include the full file path (within the repository) * Add "()" to function name for clarity Before: Error malloc: main.c:123 main: Cannot allocate memory After: Error src/firejail/main.c:123 main(): malloc: Cannot allocate memory Note: This clarifies which is the exact file that the error message comes from, as there are many source files with the same name. For example: $ git ls-files 'src/*/main.c' | wc -l 20
* build: move MAKEFLAGS to config.mk.inLibravatar Kelvin M. Klann2023-06-24
| | | | | | | To reduce the amount of boilerplate in the makefiles. This amends commit 9789c263a ("build: disable all built-in implicit make rules", 2023-06-21) / PR #5864.
* build: disable all built-in implicit make rulesLibravatar Kelvin M. Klann2023-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use `make -r` to reduce unnecessary filesystem lookups. Overall, this appears to reduce the amount of implicit rule searches by ~93.3% (~97.5% compared to a8f01a383) for the default build and by ~83.3% (~99.3% compared to a8f01a383) for the "man" target (as an example): $ git show --pretty='%h %ai %s' -s a8f01a383 2023-06-20 05:26:23 +0000 Merge pull request #5859 from kmk3/build-remove-retpoline $ ./configure >/dev/null $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 6798 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 1085 # (in the previous commit) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 2535 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 42 # (with this commit applied) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 170 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 7 Environment: GNU make 4.4.1-2 on Artix Linux. Note: According to make(1p) in POSIX.1-2017, "If .SUFFIXES does not have any prerequisites, the list of known suffixes shall be cleared.", while "The result of setting MAKEFLAGS in the Makefile is unspecified." Commands used to search and replace: $ git ls-files -z -- '*Makefile*' | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(sed -E \ 's/^(.SUFFIXES:)/\1\nMAKEFLAGS += -r\n/' '{}')\" >'{}'"
* build: disable most built-in implicit make rulesLibravatar Kelvin M. Klann2023-06-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clear `.SUFFIXES:` to reduce unnecessary filesystem lookups. Overall, this appears to reduce the amount of implicit rule searches by ~62% for the default build and by ~96% for the "man" target (as an example): $ git checkout master >/dev/null 2>&1 $ git show --pretty='%h %ai %s' -s a8f01a383 2023-06-20 05:26:23 +0000 Merge pull request #5859 from kmk3/build-remove-retpoline $ ./configure >/dev/null $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 6798 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 1085 # (with this commit applied) $ make clean >/dev/null && make --debug=i -j 4 | grep -F 'Trying implicit' | wc -l 2535 $ make clean >/dev/null && make --debug=i -j 4 man | grep -F 'Trying implicit' | wc -l 42 Environment: GNU make 4.4.1-2 on Artix Linux. Commands used to search and replace: $ git ls-files -z -- '*Makefile*' | xargs -0 -I '{}' sh -c \ "printf '%s\n' \"\$(sed '1s/^/.SUFFIXES:\n/' '{}')\" >'{}'" See also commit f48886f25 ("build: mark most phony targets as such", 2023-02-01) / PR #5637.
* build: standardize commands on top of makefilesLibravatar Kelvin M. Klann2023-06-21
| | | | To make the makefiles look more similar.
* tests: disable ping test in test/chroot/fs_chroot.expLibravatar Kelvin M. Klann2023-05-03
| | | | | | | | | | | | | | | | | Sometimes ping just works normally. Log from build_and_test[1]: TESTING: chroot (test/chroot/fs_chroot.exp) spawn /bin/bash firejail --chroot=/tmp/chroot runner@fv-az615-403:~/work/firejail/firejail/test/chroot$ [...] bash-5.1$ /bin/ping 1.1.1.1 PING 1.1.1.1 (1.1.1.1) 56(84) bytes of data. TESTING ERROR 9 [1] https://github.com/kmk3/firejail/actions/runs/4875037540/jobs/8696877757
* testingLibravatar netblue302023-03-09
|
* testingLibravatar netblue302023-03-09
|
* testingLibravatar netblue302023-03-08
|
* testingLibravatar netblue302023-03-08
|
* testingLibravatar netblue302023-03-08
|
* remove firemon --interface option - it is a duplication of firejail --net.printLibravatar netblue302023-03-08
|
* add ipv6 support in --net.printLibravatar netblue302023-03-08
|
* testingLibravatar netblue302023-03-07
|
* testingLibravatar netblue302023-03-07
|
* remove DNS lookup for --netfilter.print and --netfilter6.print commandsLibravatar netblue302023-03-07
|
* testingLibravatar netblue302023-03-07
|
* Run make codespellLibravatar Kelvin M. Klann2023-03-07
| | | | Environment: codespell 2.2.2-3 on Artix Linux.
* testingLibravatar netblue302023-03-06
|
* codespell github actionLibravatar netblue302023-03-05
|
* test apparmorLibravatar netblue302023-03-04
|
* testing: moving apparmor out from filters groupLibravatar netblue302023-03-03
|
* testing firecfgLibravatar netblue302023-03-03
|
* more testingLibravatar netblue302023-03-03
|
* restrict-namespaces testingLibravatar smitsohu2023-03-02
|
* network testing; mergesLibravatar netblue302023-03-02
|
* network testingLibravatar netblue302023-03-02
|
* appimage testingLibravatar netblue302023-03-01
|
* appimage testingLibravatar netblue302023-03-01
|
* chroot testingLibravatar netblue302023-02-28
|
* chroot testingLibravatar netblue302023-02-28
|
* random hostname by default; fix --hostname and --hosts-fileLibravatar netblue302023-02-27
|