]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common/rc: _add_dmesg_filter returns when RESULT_DIR is null
authorZorro Lang <zlang@kernel.org>
Sun, 22 Jun 2025 20:39:47 +0000 (04:39 +0800)
committerZorro Lang <zlang@kernel.org>
Fri, 11 Jul 2025 13:17:39 +0000 (21:17 +0800)
commita673bfe9fb0649d7e3bfc3fd8ae83e3874f238f4
treeaf99be18fcc00c8219eed272d39b32d9d3935216
parentd06bd62c4c4258d1cf63d94a2bf046feb846ea25
common/rc: _add_dmesg_filter returns when RESULT_DIR is null

I always hit below error on a system with readonly rootfs:

  ++ _xfs_prepare_for_eio_shutdown /dev/loop0
  ...
  ++ _add_dmesg_filter 'Internal error'
  ++ local 'regexp=Internal error'
  ++ local filter_file=/dmesg_filter
  ++ '[' '!' -e /dmesg_filter ']'
  ++ echo 'Internal error'
  ./common/rc: line 4716: /dmesg_filter: Read-only file system

The RESULT_DIR is null, due to xfstests/check calls _test_mount and
_scratch_mount before RESULT_DIR creation. And _test_mount does
_prepare_for_eio_shutdown -> _xfs_prepare_for_eio_shutdown ->
_add_dmesg_filter "Internal error" when RESULT_DIR is null.

Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc