Commit 67000f6
authored
Fix test for libsystemd v250 (#101)
The latest libsystemd can read some corrupted entries without
errors.
Since libsystemd v250, it's specification against journal file
corruption changed.
https://github.com/systemd/systemd/blob/v250/NEWS#L807-L808
In AlmaLinux9 (libsystemd v250):
require "systemd"
require "systemd/journal"
journal = Systemd::Journal.new(path: "test/fixture/corrupt")
entries = journal.to_a # Succeeds without errors
entries[2] # Before v250, it couldn't read this entry.
=> #<Systemd::JournalEntry:0x000000000003ba60 priority: '6',
_boot_id: '4737ffc504774b3ba67020bc947f1bc0', _machine_id:
'bb9d0a52a41243829ecd729b40ac0bce', _hostname: 'arch',
_source_monotonic_timestamp: '0', _transport: 'kernel',
syslog_identifier: 'kernel'>
Assuming both old and new libsystemd, it would be good to fix
the test in this way.
Signed-off-by: Daijiro Fukuda <[email protected]>1 parent 3ec3769 commit 67000f6
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
| 265 | + | |
265 | 266 | | |
266 | 267 | | |
267 | | - | |
| 268 | + | |
| 269 | + | |
268 | 270 | | |
269 | 271 | | |
0 commit comments