mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
common: Add _require_no_xfs_bug_on_assert and factor out filter_xfs_dmesg
1) Introduce _require_no_xfs_bug_on_assert helper to check if XFS is built with CONFIG_XFS_ASSERT_FATAL, and call _require_no_xfs_debug if bug_on_assert is not available. 2) Apply _require_no_xfs_bug_on_assert in xfs/098 and xfs/115. 3) Move filter_xfs_dmesg from xfs/098 to common/filter, and rename it as _filter_assert_dmesg. [eguan: update comment and _notrun message a bit] Signed-off-by: xiao yang <yangx.jy@cn.fujitsu.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
@@ -570,5 +570,16 @@ _filter_aiodio_dmesg()
|
||||
-e "s#$warn9#Intentional warnings in dio_complete#"
|
||||
}
|
||||
|
||||
# We generate assert related WARNINGs on purpose and make sure test doesn't fail
|
||||
# because of these warnings. This is a helper for _check_dmesg() to filter out
|
||||
# them.
|
||||
_filter_assert_dmesg()
|
||||
{
|
||||
local warn1="WARNING:.*fs/xfs/xfs_message\.c:.*asswarn.*"
|
||||
local warn2="WARNING:.*fs/xfs/xfs_message\.c:.*assfail.*"
|
||||
sed -e "s#$warn1#Intentional warnings in asswarn#" \
|
||||
-e "s#$warn2#Intentional warnings in assfail#"
|
||||
}
|
||||
|
||||
# make sure this script returns success
|
||||
/bin/true
|
||||
|
||||
Reference in New Issue
Block a user