[LTP] [PATCH v2] syscalls/quotactl07: add regresstion test for Q_XQTUOTARM

Yang Xu xuyang2018.jy@cn.fujitsu.com
Fri Feb 21 03:08:30 CET 2020


Hi> Hi!
>> This is a regresstion test to check Q_XQUOTARM  whether has
>> quota flags check.
>>
>> Signed-off-by: Yang Xu <xuyang2018.jy@cn.fujitsu.com>
>>
>> ---------------------
>> 1.Simplify test code
>> 2.add comment for invalid_type,
>> ---------------------
>    ^
>    Btw this belongs under the three dashes below, otherwise it ends up in
>    the commit message when applied.
> 
OK. I will notice this next time.
> ...
> 
>> +static void setup(void)
>> +{
>> +	TEST(quotactl(QCMD(Q_XQUOTAOFF, USRQUOTA), tst_device->dev, 0, (void *)&qflag_acct));
>> +	if (TST_RET == -1)
>> +		tst_brk(TBROK | TTERRNO, "quotactl with Q_XQUOTAOFF failed");
>> +
>> +	TEST(quotactl(QCMD(Q_XQUOTARM, USRQUOTA), tst_device->dev, 0, (void *)&valid_type));
>> +	if (TST_ERR == EINVAL) {
>> +		tst_res(TCONF, "current system doesn't support Q_XQUOTARM, skip it");
>> +		return;
> 
> I've changed this to tst_brk() because doing return from setup has no
> efect here, and pushed, thanks.
Thanks for pushing.
> 




More information about the ltp mailing list