Commit graph

535 commits

Author SHA1 Message Date
Reiner Herrmann
c971903de0 tests: disable calling curl in dns test, as systemd-resolved is used on CI runner 2022-07-30 10:48:33 +02:00
Reiner Herrmann
4221b15f93 tests: try curl instead of wget for tracing dns resolution 2022-07-30 10:48:33 +02:00
Reiner Herrmann
b4f4444862 tests: add alternative message for skipping test 2022-07-30 10:48:33 +02:00
Reiner Herrmann
e1cb7ce296 tests: drop checking for hosts file in trace test
firejail is no longer detecting that /etc/hosts is getting opened.
in strace it can still be seen that the file is opened via syscall,
but on C library layer (which firejail is tracing) it's probably
implemented differently now.
2022-07-30 10:48:33 +02:00
Reiner Herrmann
057f431b0a CI: fix wrong matching for test errors
grep was returning non-zero exit code if it did NOT find the
error marker, and zero if it did.
2022-07-30 10:48:33 +02:00
netblue30
502b9bbd90 testing fix 2022-07-10 11:07:46 -04:00
netblue30
70aaf6fea4
Merge pull request #5219 from kmk3/build-reduce-config-files
build: reduce autoconf input files from 32 to 2
2022-06-30 09:00:15 -04:00
Kelvin M. Klann
011d84b462 build: reduce autoconf input files from 32 to 2
Configure summary: autoconf essentially only parses configure.ac and
generates the configure script (that is, the "./configure" shell
script).  The latter is what actually checks what is available on the
system and internally sets the value of the output variables.  It then,
for every filename foo in AC_CONFIG_FILES (and for every output variable
name BAR in AC_SUBST), reads foo.in, replaces every occurrence of
`@BAR@` with the value of the shell variable `$BAR` and generates the
file foo from the result.  After this, configure is finished and `make`
could be executed to start the build.

Now that (as of #5140) all output variables are only defined on
config.mk.in and on config.sh.in, there is no need to generate any
makefile nor any other mkfile or shell script at configure time.  So
rename every "Makefile.in" to "Makefile", mkdeb.sh.in to mkdeb.sh,
src/common.mk.in to src/common.mk and leave just config.mk and config.sh
as the files to be generated at configure time.

This allows editing and committing all makefiles directly, without
potentially having to run ./configure in between.

Commands used to rename the makefiles:

    $ git ls-files -z -- '*Makefile.in' | xargs -0 -I '{}' sh -c \
      "git mv '{}' \"\$(dirname '{}')/Makefile\""

Additionally, from my (rudimentary) testing, this commit reduces the
time it takes to run ./configure by about 20~25% compared to commit
72ece92ea ("Transmission fixes: drop private-lib (#5213)", 2022-06-22).
Environment: dash 0.5.11.5-1, gcc 12.1.0-2, Artix Linux, ext4 on an HDD.

Commands used for benchmarking each commit:

    $ : >time_configure && ./configure && make distclean &&
      for i in $(seq 1 10); do
      { time -p ./configure; } 2>>time_configure; done
    $ grep real time_configure |
      awk '{ total += $2 } END { print total/NR }'
2022-06-30 05:30:14 -03:00
Kelvin M. Klann
92d59b7bdb test/fs: enable private-lib in firejail.config
Before running test/fs/private-lib.exp.

Inspired by the configuration changes that are done on
test/root/checkcfg.exp.

Reason: Since commit 9741d0b60 ("fix disabled private-lib in
/etc/firejail/firejail.config", 2022-06-23), the "build_and_test" job
fails with the following error[1]:

    TESTING: private-lib (test/fs/private-lib.exp)
    spawn /bin/bash
    firejail --private-lib --private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty
    runner@fv-az489-993:~/work/firejail/firejail/test/fs$
    <private-bin=sh,bash,dash,ps,grep,ls,find,echo,stty
    Error: private-lib feature is disabled in Firejail configuration file
    runner@fv-az489-993:~/work/firejail/firejail/test/fs$ TESTING ERROR 1

This fixes CI.

Fixes #5214.

Relates to #5190.

[1] https://github.com/netblue30/firejail/runs/7030862406
2022-06-25 03:14:08 +00:00
netblue30
7ad735deaf deprecating --shell (3) (#5196) 2022-06-21 08:51:00 -04:00
netblue30
bb14c205b5 shell none set as default (6) 2022-06-19 20:03:14 -04:00
netblue30
396bba53c4 shell none set as default (5) 2022-06-19 17:50:32 -04:00
netblue30
4caf05b08d shell none set as default (4) 2022-06-19 17:42:15 -04:00
netblue30
dab6742eee more on removing cgroups (#5200) 2022-06-16 10:12:10 -04:00
netblue30
bc48ad064b fix CI 2022-06-15 19:44:48 -04:00
Kelvin M. Klann
ed5f3fca1a test/fs/invalid_filename.exp: s/end/send/
This amends commit c165510dc ("CI: remove cgroup test because feature
has been removed", 2022-06-13).
2022-06-14 01:03:52 -03:00
Reiner Herrmann
c165510dcd CI: remove cgroup test because feature has been removed 2022-06-13 21:02:37 +02:00
netblue30
95544a17fa more on disable cgroups 2022-06-13 09:26:37 -04:00
smitsohu
04ff0edf74 shutdown testing 2022-06-08 15:19:46 +02:00
netblue30
880f2c98a1 Removed IDS feature from the default build. To enable it, use --enable-ids at compile time. 2022-05-25 07:36:42 -04:00
smitsohu
00cb236add fix testing 2022-03-10 16:42:57 +01:00
smitsohu
7505535d6c fix testing 2022-03-10 16:05:31 +01:00
netblue30
e6c50240f9 --tab: enable shell tab completion 2022-02-20 08:05:33 -05:00
smitsohu
7578e86ef8 testing: fix expect matching of numbers
The sandbox timestamp should not be available for matching
when output is already expected from the next command
(this is only a problem if numeric output if expected from the
first command in the sandbox).

A possible alternative would be to flush the expect output buffer
with 'expect "*"' after the sandbox is up.
2022-02-09 18:30:45 +01:00
netblue30
86a57917aa fix --private-cwd, issue #4910 2022-02-08 10:30:22 -05:00
netblue30
f9d50521f7 small fixes 2022-01-31 09:43:22 -05:00
smitsohu
9672e30b24 testing 2022-01-23 13:01:40 +01:00
netblue30
f094521fe8 fix fcopy testing 2022-01-11 20:57:49 -05:00
netblue30
121749f0ca 2022 copyright update 2022-01-07 12:23:47 -05:00
netblue30
96cec210f8 fix make test-filter 2021-12-19 13:05:16 -05:00
netblue30
3fc2b91a82 testing 2021-12-18 19:07:08 -05:00
smitsohu
c477e00ddd testing 2021-11-20 14:06:06 +01:00
Kelvin M. Klann
a7e4b9b9b2 Revert "allow/deny fbuilder"
This reverts commit 4438f14f28.

Also, partially revert related commit e4307b409 ("fix whitelist/allow in
make test-utils") to keep the tests working.

The profiles are being generated using aliases, which are not used on
the profiles in the repository.  So generate them using the normal
commands for consistency.  See also commit dd13595b8 ("Revert
"allow/deny help and man pages"") / PR #4502.

Relates to #4410.

Misc: I noticed this on issue #4592.
2021-10-06 15:19:52 -03:00
smitsohu
921c9cc153 join: add support for rlimit options 2021-09-22 20:12:58 +02:00
startx2017
e4307b409b fix whitelist/allow in make test-utils 2021-07-29 08:07:28 -04:00
startx2017
0043826934 cleanup make test-fs 2021-07-29 07:57:27 -04:00
startx2017
b4424d9478 rework make test-fs 2021-07-29 07:47:16 -04:00
smitsohu
2b696b4d90 testing 2021-07-22 01:11:50 +02:00
Reiner Herrmann
0f0325459e Merge branch 'master' into kuesji/master 2021-06-21 23:10:09 +02:00
Reiner Herrmann
ee1ea7d226 style: grammer and codestyle improvements 2021-06-21 23:09:34 +02:00
smitsohu
1a66c8b805 testing 2021-06-21 02:00:20 +02:00
kuesji koesnu
271dc51fa6 grammar issues and fixing test cases for rlimit 2021-06-20 08:41:33 +03:00
smitsohu
41a895a4c6
Merge pull request #4302 from smitsohu/whitelist2
Whitelist2 follow-up
2021-05-23 19:04:18 +02:00
smitsohu
45919bfa5e whitelist testing (#4229, #4297, #4300) 2021-05-23 18:41:24 +02:00
netblue30
d8d016dc44 support trailing comments on profile lines 2021-05-21 08:56:45 -04:00
Reiner Herrmann
632d47c906 tests: adjust expected values of --build test 2021-05-12 23:36:49 +02:00
Reiner Herrmann
c69836c5b8 tests: adjust expected values of --build test
Fixes #4256
2021-05-10 22:17:57 +02:00
smitsohu
a22c5b0a92 make appimage mounts private to sandbox 2021-03-13 18:59:24 +01:00
Reiner Herrmann
22fd89b870
Merge pull request #4024 from kmk3/improve-makefiles
Makefile improvements
2021-03-01 21:05:06 +01:00
Reiner Herrmann
396eb2ec7c tests: also remove arguments tests which also depend on faudit 2021-03-01 20:45:28 +01:00