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

Cyril Hrubis chrubis@suse.cz
Thu Nov 11 15:30:06 CET 2021


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.

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list