aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-08-23 11:55:02 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-08-23 12:02:24 -0300
commit72c6df3af5848f5551414f1749bd7fab86b28a60 (patch)
tree552e65cb15df685f4fd0166a0b04f9b3ff8f44cb
parentdisable-devel.inc: split packaging-related entries (diff)
downloadfirejail-72c6df3af5848f5551414f1749bd7fab86b28a60.tar.gz
firejail-72c6df3af5848f5551414f1749bd7fab86b28a60.tar.zst
firejail-72c6df3af5848f5551414f1749bd7fab86b28a60.zip
tests: properly fix fs/kmsg test
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).
-rw-r--r--.github/workflows/test.yml2
-rwxr-xr-xtest/fs/kmsg.exp3
2 files changed, 3 insertions, 2 deletions
diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml
index 0b679c1c8..3414c97ee 100644
--- a/.github/workflows/test.yml
+++ b/.github/workflows/test.yml
@@ -17,6 +17,7 @@ on:
17 - config.sh.in 17 - config.sh.in
18 - configure 18 - configure
19 - configure.ac 19 - configure.ac
20 - etc/profile-a-l/default.profile
20 - src/firecfg/firecfg.config 21 - src/firecfg/firecfg.config
21 pull_request: 22 pull_request:
22 paths: 23 paths:
@@ -32,6 +33,7 @@ on:
32 - config.sh.in 33 - config.sh.in
33 - configure 34 - configure
34 - configure.ac 35 - configure.ac
36 - etc/profile-a-l/default.profile
35 - src/firecfg/firecfg.config 37 - src/firecfg/firecfg.config
36 38
37permissions: # added using https://github.com/step-security/secure-workflows 39permissions: # added using https://github.com/step-security/secure-workflows
diff --git a/test/fs/kmsg.exp b/test/fs/kmsg.exp
index 1e647ab8d..deab8fcf5 100755
--- a/test/fs/kmsg.exp
+++ b/test/fs/kmsg.exp
@@ -7,7 +7,7 @@ set timeout 10
7spawn $env(SHELL) 7spawn $env(SHELL)
8match_max 100000 8match_max 100000
9 9
10send -- "firejail\r" 10send -- "firejail --ignore=private-dev\r"
11expect { 11expect {
12 timeout {puts "TESTING ERROR 1\n";exit} 12 timeout {puts "TESTING ERROR 1\n";exit}
13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms" 13 -re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
@@ -17,7 +17,6 @@ sleep 1
17send -- "cat /dev/kmsg\r" 17send -- "cat /dev/kmsg\r"
18expect { 18expect {
19 timeout {puts "TESTING ERROR 2\n";exit} 19 timeout {puts "TESTING ERROR 2\n";exit}
20 "No such file or directory" # FIXME: Needed in CI
21 "Permission denied" 20 "Permission denied"
22} 21}
23after 100 22after 100