Skip to content

Commit 120342b

Browse files
mrc0mmandbluca
authored andcommitted
test: match all messages with the FILE field
As the systemd-pstore process is quite short lived, it might sometimes lack the necessary metadata to make matching against a unit or a syslog tag work. Since we already use a cursor file to make the matching window small as possible, let's just drop the unit match completely and hope for the best. Resolves: #27453 (cherry picked from commit edea0d6)
1 parent e0da5c9 commit 120342b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/units/testsuite-74.pstore.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ for unlink in yes no; do
150150
[[ "$(file_count /sys/fs/pstore)" -ge "$exp_count" ]]
151151
[[ "$(file_count /var/lib/systemd/pstore/)" -ne 0 ]]
152152
# We always log to journal
153-
diff "$DUMMY_DMESG_1" <(journalctl -o cat -u systemd-pstore --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
153+
diff "$DUMMY_DMESG_1" <(journalctl -o cat --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
154154
filename="$(printf "/var/lib/systemd/pstore/%s/%0.3d/dmesg.txt" "$timestamp" "$(file_size "$DUMMY_DMESG_1")")"
155155
diff "$DUMMY_DMESG_1" "$filename"
156156

@@ -180,7 +180,7 @@ for unlink in yes no; do
180180
start_pstore
181181
[[ "$(file_count /sys/fs/pstore)" -ge "$exp_count" ]]
182182
[[ "$(file_count /var/lib/systemd/pstore/)" -eq 0 ]]
183-
diff "$DUMMY_DMESG_1" <(journalctl -o cat -u systemd-pstore --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
183+
diff "$DUMMY_DMESG_1" <(journalctl -o cat --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
184184

185185
: "Backend: ERST; Storage: external; Unlink: $unlink"
186186
prepare_pstore_config "external" "$unlink"
@@ -190,7 +190,7 @@ for unlink in yes no; do
190190
[[ "$(file_count /sys/fs/pstore)" -ge "$exp_count" ]]
191191
[[ "$(file_count /var/lib/systemd/pstore/)" -ne 0 ]]
192192
# We always log to journal
193-
diff "$DUMMY_DMESG_1" <(journalctl -o cat -u systemd-pstore --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
193+
diff "$DUMMY_DMESG_1" <(journalctl -o cat --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
194194
filename="$(printf "/var/lib/systemd/pstore/%0.16d/dmesg.txt" "$last_id")"
195195
diff "$DUMMY_DMESG_1" "$filename"
196196

@@ -217,5 +217,5 @@ for unlink in yes no; do
217217
start_pstore
218218
[[ "$(file_count /sys/fs/pstore)" -ge "$exp_count" ]]
219219
[[ "$(file_count /var/lib/systemd/pstore/)" -eq 0 ]]
220-
diff "$DUMMY_DMESG_1" <(journalctl -o cat -u systemd-pstore --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
220+
diff "$DUMMY_DMESG_1" <(journalctl -o cat --output-fields=FILE --cursor-file=/tmp/journal.cursor | sed "/^$/d")
221221
done

0 commit comments

Comments
 (0)