mirror of
https://github.com/versity/scoutfs.git
synced 2026-08-28 11:56:38 +00:00
scoutfs-tests: only check for new dmesg entries
The dmesg check was creating false positives when unexpected messages from before the test run were forced out of the ring. The evicted messages were showing up as removals in the diff. We only want to see new messages that were created during the test run. So we format the diff to only output added lines. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
+7
-5
@@ -474,15 +474,17 @@ for t in $tests; do
|
||||
message=$(cat "$T_TMPDIR/status.msg")
|
||||
fi
|
||||
|
||||
# see if anything unexpected showed up in dmesg
|
||||
# see if anything unexpected was added to dmesg
|
||||
if [ "$sts" == "$T_PASS_STATUS" ]; then
|
||||
dmesg | t_filter_dmesg > "$T_TMPDIR/dmesg.after"
|
||||
diff -u "$T_TMPDIR/dmesg.before" "$T_TMPDIR/dmesg.after" > \
|
||||
"$T_TMPDIR/dmesg.diff"
|
||||
if [ -s "$T_TMPDIR/dmesg.diff" ]; then
|
||||
diff --old-line-format="" --unchanged-line-format="" \
|
||||
"$T_TMPDIR/dmesg.before" "$T_TMPDIR/dmesg.after" > \
|
||||
"$T_TMPDIR/dmesg.new"
|
||||
|
||||
if [ -s "$T_TMPDIR/dmesg.new" ]; then
|
||||
message="unexpected messages in dmesg"
|
||||
sts=$T_FAIL_STATUS
|
||||
cat "$T_TMPDIR/dmesg.diff" >> "$T_RESULTS/fail.log"
|
||||
cat "$T_TMPDIR/dmesg.new" >> "$T_RESULTS/fail.log"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user