[LTP] [PATCH 2/3] quotactl08: Use do_mount()
Petr Vorel
pvorel@suse.cz
Tue Mar 1 08:58:51 CET 2022
> Hi Petr
> > Hi Xu,
> >> Hi Petr
> >>> to change
> >>> quotactl08.c:160: TBROK: mount(/dev/loop0, mntpoint, ext4, 0, (nil)) failed: ESRCH (3)
> >> I doubt why fs quota is not supported on this case since we have check
> >> kernel config?
> > There is probably bug on the SUT, thus it might be correct it fails.
> > But how about martin's fix 4aab31e4c7 ("syscalls/quotactl: Skip tests if FS
> > quota is not supported") - quotactl04.c also checks for CONFIG_QFMT_V2 and uses
> > do_mount(). I'll check whether it was another bug on the system.
> Maybe we miss check the following kernel config?
In my case it's probably a problem with mkfs.
> CONFIG_QUOTA=y
Selected by [m]:
- OCFS2_FS [=m] && BLOCK [=y] && INET [=y] && SYSFS [=y] && CONFIGFS_FS [=m]
=> very unlikely not to be selected (but we might want to check also corner case
configurations; but I guess also CONFIG_QUOTA=m would be ok)
> CONFIG_QUOTA_TREE=y
Selected by [m]:
- OCFS2_FS [=m] && BLOCK [=y] && INET [=y] && SYSFS [=y] && CONFIGFS_FS [=m]
Selected by [n]:
- QFMT_V2 [=n] && QUOTA [=y]
ditto
> CONFIG_QUOTACTL=y
Selected by [y]:
- QUOTA [=y]
Selected by [m]:
- XFS_QUOTA [=y] && BLOCK [=y] && XFS_FS [=m]
- GFS2_FS [=m] && BLOCK [=y]
even more likely to be selected.
Kind regards,
Petr
> Best Regards
> Yang Xu
> > Kind regards,
> > Petr
> >> Best Regards
> >> Yang Xu
> >>> to TCONF if FS quota is not supported (the same fix as 4aab31e4c7).
> >>> Signed-off-by: Petr Vorel<pvorel@suse.cz>
> >>> ---
> >>> testcases/kernel/syscalls/quotactl/quotactl08.c | 2 +-
> >>> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>> diff --git a/testcases/kernel/syscalls/quotactl/quotactl08.c b/testcases/kernel/syscalls/quotactl/quotactl08.c
> >>> index 3793867f23..9f54bebcc0 100644
> >>> --- a/testcases/kernel/syscalls/quotactl/quotactl08.c
> >>> +++ b/testcases/kernel/syscalls/quotactl/quotactl08.c
> >>> @@ -157,7 +157,7 @@ static void setup(void)
> >>> quotactl_info();
> >>> SAFE_MKFS(tst_device->dev, tst_device->fs_type, fs_opts, NULL);
> >>> - SAFE_MOUNT(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL);
> >>> + do_mount(tst_device->dev, MNTPOINT, tst_device->fs_type, 0, NULL);
> >>> mount_flag = 1;
> >>> fd = SAFE_OPEN(MNTPOINT, O_RDONLY);
More information about the ltp
mailing list