Skip to content

Commit

Permalink
tests: properly fix fs/kmsg test
Browse files Browse the repository at this point in the history
It was broken likely due to `private-dev` being added to default.profile
on commit 307dad5 ("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 75cefd5 ("tests: fix error when /dev/kmsg is
missing", 2023-08-21).
  • Loading branch information
kmk3 committed Aug 23, 2023
1 parent 962dedb commit 72c6df3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ on:
- config.sh.in
- configure
- configure.ac
- etc/profile-a-l/default.profile
- src/firecfg/firecfg.config
pull_request:
paths:
Expand All @@ -32,6 +33,7 @@ on:
- config.sh.in
- configure
- configure.ac
- etc/profile-a-l/default.profile
- src/firecfg/firecfg.config

permissions: # added using https://github.com/step-security/secure-workflows
Expand Down
3 changes: 1 addition & 2 deletions test/fs/kmsg.exp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ set timeout 10
spawn $env(SHELL)
match_max 100000

send -- "firejail\r"
send -- "firejail --ignore=private-dev\r"
expect {
timeout {puts "TESTING ERROR 1\n";exit}
-re "Child process initialized in \[0-9\]+.\[0-9\]+ ms"
Expand All @@ -17,7 +17,6 @@ sleep 1
send -- "cat /dev/kmsg\r"
expect {
timeout {puts "TESTING ERROR 2\n";exit}
"No such file or directory" # FIXME: Needed in CI
"Permission denied"
}
after 100
Expand Down

0 comments on commit 72c6df3

Please sign in to comment.