[LTP] [PATCH 2/3] quotactl08: Use do_mount()

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Tue Mar 1 02:11:25 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?
CONFIG_QUOTA=y
CONFIG_QUOTA_TREE=y
CONFIG_QUOTACTL=y

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