[LTP] [PATCH v2] syscalls/quotactl07: add regresstion test for Q_XQTUOTARM
Cyril Hrubis
chrubis@suse.cz
Thu Feb 20 13:48:21 CET 2020
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.
...
> +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.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list