On Tue, 10 Jan 2023 22:12:23 +0800, 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: Yes, if the ext4 kmod is not loaded then it won't appear in /proc/filesystems. _require_extra_fs should work, as it calls modprobe before checking /proc/filesystems. Cheers, David