Skip to content

Commit

Permalink
tests: improve detection of readable systemd journal
Browse files Browse the repository at this point in the history
Look for system.journal in journal sub-directory.
Add -readable to the find command.

Bug: https://bugs.gentoo.org/794931
  • Loading branch information
floppym committed Jun 8, 2021
1 parent 92f9003 commit a5e77c7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fail2ban/tests/filtertestcase.py
Expand Up @@ -1352,7 +1352,7 @@ def _getRuntimeJournal(self):
# check one at at time until the first hit
for systemd_var in 'system-runtime-logs', 'system-state-logs':
tmp = Utils.executeCmd(
'find "$(systemd-path %s)" -name system.journal' % systemd_var,
'find "$(systemd-path %s)/journal" -name system.journal -readable' % systemd_var,
timeout=10, shell=True, output=True
)
self.assertTrue(tmp)
Expand Down

0 comments on commit a5e77c7

Please sign in to comment.