[LTP] [PATCH] syscalls/mount03: Add statfs f_flags member check

Richard Palethorpe rpalethorpe@suse.de
Mon Oct 24 16:49:36 CEST 2022


Hello,

"xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com> writes:

> Hi Petr
>
>> Hi Xu,
>> 
>> Reviewed-by: Petr Vorel <pvorel@suse.cz>
>> 
>>>   static void run(unsigned int n)
>>>   {
>>>   	struct tcase *tc = &tcases[n];
>>> +	struct statfs stfs;
>> 
>>>   	tst_res(TINFO, "Testing flag %s", tc->desc);
>> 
>>> @@ -159,6 +160,11 @@ static void run(unsigned int n)
>>>   	if (tc->test)
>>>   		tc->test();
>> 
>>> +	SAFE_STATFS(MNTPOINT, &stfs);
>>> +	if (stfs.f_flags & (n == 3 ? MS_REMOUNT : tc->flag))
>> Wouldn't it be better to add another struct member for this check?
>
> Of course, it seems better.
>
> Best Regards
> Yang Xu

OK... Petr are you going to merge this with your changes?

Acked-by: Richard Palethorpe <rpalethorpe@suse.com>

-- 
Thank you,
Richard.


More information about the ltp mailing list