On 10.01.23 15:12, Zorro Lang wrote: > On Tue, Jan 10, 2023 at 07:23:22PM +0800, Wang Yugui wrote: >> Hi, >> >>> btrfs/012 is requiring ext4 support to test the conversion, but the test >>> case is only checking if mkfs.ext4 is available, not if the filesystem >>> driver is actually available on the test host. >>> >>> Check if the driver is available as well, before trying to run the test. >>> >>> Signed-off-by: Johannes Thumshirn <johannes.thumshirn@xxxxxxx> >>> --- >>> tests/btrfs/012 | 2 ++ >>> 1 file changed, 2 insertions(+) >>> >>> diff --git a/tests/btrfs/012 b/tests/btrfs/012 >>> index 60461a342545..86fbbb7ac189 100755 >>> --- a/tests/btrfs/012 >>> +++ b/tests/btrfs/012 >>> @@ -32,6 +32,8 @@ _require_command "$E2FSCK_PROG" e2fsck >>> _require_non_zoned_device "${SCRATCH_DEV}" >>> _require_loop >>> >>> +grep -q ext4 /proc/filesystems || _notrun "no ext4 support" >> >> when ext4 is module, and is not used, 'ext4' will not be in /proc/filesystems. > > Really? Actually I'm not sure about that. There's an existing helper in > common/rc named _require_extra_fs(). Which we usually used to check if > a secondary filesystem is supported by the current kernel. Likes: > > $ grep -rsn _require_extra_fs tests/ > tests/generic/631:42:_require_extra_fs overlay > tests/generic/699:26:_require_extra_fs overlay > tests/overlay/025:36:_require_extra_fs tmpfs > tests/overlay/106:22:_require_extra_fs tmpfs > tests/overlay/107:22:_require_extra_fs tmpfs > tests/overlay/108:22:_require_extra_fs tmpfs > tests/overlay/109:22:_require_extra_fs tmpfs > tests/xfs/049:43:_require_extra_fs ext2 Ha that helper is what I was looking for, but couldn't find it.