[LTP] [PATCH v3 07/12] syscalls/quotactl08: Test quoatctl01 but quota info hidden in filesystem

xuyang2018.jy@fujitsu.com xuyang2018.jy@fujitsu.com
Fri Nov 26 10:32:53 CET 2021


Hi Cyril
> Hi!
>>>> +	f = SAFE_POPEN("mkfs.ext4 -V 2>&1", "r");
>>>> +	rc = fscanf(f, "mke2fs %d.%d.%d",&major,&minor,&patch);
>>>> +	if (rc != 3)
>>>> +		tst_res(TWARN, "Unable parse version number");
>>>> +	else if (major * 10000 + minor * 100 + patch<   14300)
>>>> +		tst_brk(TCONF, "Test needs mkfs.ext4>= 1.43 for quota option, test skipped");
>>>> +	pclose(f);
>>>
>>> Ideally this should be added to the .needs_cmds instead so that we get
>>> the minimal version in the test metadata too.
>> Good suggestion, I am looking your code. But As my commit log said,  add
>> a lib mkfs.ext4 version check after this quotactl patchset are merged.
>
> Sure I will continue with the review of the patches next week.
>
>> Then we can add this version check and make use it for not only
>> quotactl04,08,09 case but also for statx05.c.
>
> Indeed, the plan is to use this for all tests that needs to check any
> versions of the tools.
Got it.
I have write a draft for this and works well.
I will send the parser patch in the next week.

Best Regards
Yang Xu
>


More information about the ltp mailing list