public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] syscalls/quotactl02.c: Reconstruct and Convert to new API
Date: Mon, 31 Oct 2016 14:25:36 +0100	[thread overview]
Message-ID: <20161031132536.GA32461@rei> (raw)
In-Reply-To: <1477913601-21745-1-git-send-email-yangx.jy@cn.fujitsu.com>

Hi!
> -} TC[] = {
> -	{Q_XQUOTAOFF, &qflag, check_qoff, NULL},
> -	{Q_XQUOTAON, &qflag, check_qon, NULL},
> -	{Q_XGETQUOTA, &dquota, check_getq, NULL},
> -	{Q_XSETQLIM, &dquota, check_setqlim, setup_setqlim},
> -	{Q_XGETQSTAT, &qstat, check_getqstat, NULL},
> +	void (*func_check)();
> +	char *des;
> +} tcases[] = {
> +	{QCMD(Q_XQUOTAOFF, USRQUOTA), &test_id, &qflag, NULL,
> +	"turn off xfs quota"},
> +	{QCMD(Q_XGETQSTAT, USRQUOTA), &test_id, &res_qstat, check_qoff,
> +	"get xfs quota off status"},
> +	{QCMD(Q_XQUOTAON, USRQUOTA), &test_id, &qflag, NULL,
> +	"turn on xfs quota"},
> +	{QCMD(Q_XGETQSTAT, USRQUOTA), &test_id, &res_qstat, check_qon,
> +	"get xfs quota on status"},
> +	{QCMD(Q_XSETQLIM, USRQUOTA), &test_id, &set_dquota, NULL,
> +	"set xfs disk quota limits"},
> +	{QCMD(Q_XGETQUOTA, USRQUOTA), &test_id, &res_dquota, check_getqlim,
> +	"get xfs disk quota limits"}
>  };

Looking at this part there is a problem that these testcases depends on
each other. I.e. that the test to check that quota is turned off needs
to be executed after we run the test to turn the quota off.

Now this will break horribly if we ever add default test options to
select the number of the test to execute. So what about addin the
quotactl() call to the check_{qoff,qon,getqlim} call and rather than
being a separate test add them as a check for the OFF/ON/SET calls?

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-10-31 13:25 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-21  6:53 [LTP] [PATCH 1/2] syscalls/quotatcl01.c: Rewrite && Convert to new API Xiao Yang
2016-10-21  6:53 ` [LTP] [PATCH 2/2] syscalls/quotactl02.c: Reconstruct and " Xiao Yang
2016-10-24 10:49 ` [LTP] [PATCH 1/2] syscalls/quotatcl01.c: Rewrite && " Cyril Hrubis
2016-10-25  6:08   ` Xiao Yang
2016-10-25  6:15   ` [LTP] [PATCH v2] " Xiao Yang
2016-10-31 10:11     ` Cyril Hrubis
2016-10-31 10:20       ` Xiao Yang
2016-10-31 11:33       ` [LTP] [PATCH] syscalls/quotactl02.c: Reconstruct and " Xiao Yang
2016-10-31 13:25         ` Cyril Hrubis [this message]
2016-11-01  8:33           ` [LTP] [PATCH v2] syscalls/quotactl02.c: Reconstruct && " Xiao Yang
2016-11-01 15:52             ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161031132536.GA32461@rei \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox