public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: "xuyang2018.jy@fujitsu.com" <xuyang2018.jy@fujitsu.com>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: "ltp@lists.linux.it" <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v6 3/3] syscalls/quotactl: Make use of TST_EXP_PASS_SILENT and TST_EXP_FAIL
Date: Fri, 14 Jan 2022 03:58:10 +0000	[thread overview]
Message-ID: <61E0F509.3090506@fujitsu.com> (raw)
In-Reply-To: <YeA7BQvnZ12c/QjT@yuki>

Hi Cyril
> Hi!
>>   } tcases[] = {
>> -	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, testdir1, EACCES, 0},
>> -	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, testdir2, ENOENT, 0},
>> -	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, usrpath, EBUSY, 1},
>> -	{QCMD(Q_SETQUOTA, USRQUOTA),&fmt_id, NULL, EFAULT, 1},
>> -	{QCMD(OPTION_INVALID, USRQUOTA),&fmt_id, usrpath, EINVAL, 0},
>> -	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, usrpath, ENOTBLK, 0},
>> -	{QCMD(Q_SETQUOTA, USRQUOTA),&test_id,&set_dq, ESRCH, 0},
>> -	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_invalid, usrpath, ESRCH, 0},
>> -	{QCMD(Q_GETNEXTQUOTA, USRQUOTA),&test_invalid, usrpath, ESRCH, 0},
>> -	{QCMD(Q_SETQUOTA, USRQUOTA),&test_id,&set_dqmax, ERANGE, 1},
>> -	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, usrpath, EPERM, 0},
>> +	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, testdir1, EACCES, 0,
>> +	"EACCES when cmd is Q_QUOTAON and addr existed but not a regular file"},
>> +
>> +	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, testdir2, ENOENT, 0,
>> +	"ENOENT when the file specified by special or addr does not exist"},
>> +
>> +	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, usrpath, EBUSY, 1,
>> +	"EBUSY when cmd is Q_QUOTAON and another Q_QUOTAON had already been performed"},
>> +
>> +	{QCMD(Q_SETQUOTA, USRQUOTA),&fmt_id, NULL, EFAULT, 1,
>> +	"EFAULT when addr or special is invalid"},
>> +
>> +	{QCMD(OPTION_INVALID, USRQUOTA),&fmt_id, usrpath, EINVAL, 0,
>> +	"EINVAL when cmd or type is invalid"},
>> +
>> +	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, usrpath, ENOTBLK, 0,
>> +	"ENOTBLK when special is not a block device"},
>> +
>> +	{QCMD(Q_SETQUOTA, USRQUOTA),&test_id,&set_dq, ESRCH, 0,
>> +	"ESRCH when no disk quota is found for the indicated user and quotas "
>> +	"have not been turned on for this fs"},
>> +
>> +	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_invalid, usrpath, ESRCH, 0,
>> +	"ESRCH when cmd is Q_QUOTAON, but the quota format was not found"},
>> +
>> +	{QCMD(Q_GETNEXTQUOTA, USRQUOTA),&test_invalid, usrpath, ESRCH, 0,
>> +	"ESRCH when cmd is Q_GETNEXTQUOTA, but there is no ID greater than or "
>> +	"equal to id that has an active quota"},
>> +
>> +	{QCMD(Q_SETQUOTA, USRQUOTA),&test_id,&set_dqmax, ERANGE, 1,
>> +	"ERANGE when cmd is Q_SETQUOTA, but the specified limits are out of "
>> +	"the range allowed by the quota format"},
>> +
>> +	{QCMD(Q_QUOTAON, USRQUOTA),&fmt_id, usrpath, EPERM, 0,
>> +	"EPERM when the caller lacked the required privilege (CAP_SYS_ADMIN) "
>> +	"for the specified operation"},
>
> These descriptions could be a bit shorter and still have the same amount
> of information, for instance the last one could be shortened to just:
>
> "EPERM when caller lacks required privilege (CAP_SYS_ADMIN)"
>
> or
>
> "ESRCH for Q_GETNEXTQUOTA but the id was last one"
>
> or
>
> "ESRCH for Q_GETNEXTQUOTA but no quota found for the user or quotas are off"
>
> Ideally all the messages should fit into a single line less than 80
> characters...
>
>
> Other than that this is a nice cleanup, with the messages shortened:
Thanks for your review, I have modified these and then pushed this patchset.

Best Regards
Yang Xu
>
> Reviewed-by: Cyril Hrubis<chrubis@suse.cz>
>

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2022-01-14  3:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-12  7:48 [LTP] [PATCH v6 1/3] syscalls/quotactl09: Test error when quota info hidden in filesystem Yang Xu
2022-01-12  7:48 ` [LTP] [PATCH v6 2/3] syscalls/quotactl07: Refactor this case Yang Xu
2022-01-13 14:03   ` Cyril Hrubis
2022-01-14  3:29     ` xuyang2018.jy
2022-01-12  7:48 ` [LTP] [PATCH v6 3/3] syscalls/quotactl: Make use of TST_EXP_PASS_SILENT and TST_EXP_FAIL Yang Xu
2022-01-13 14:45   ` Cyril Hrubis
2022-01-14  3:58     ` xuyang2018.jy [this message]
2022-01-12  9:18 ` [LTP] [PATCH v6 1/3] syscalls/quotactl09: Test error when quota info hidden in filesystem xuyang2018.jy
2022-01-12  9:46   ` Cyril Hrubis
2022-01-13  6:51     ` xuyang2018.jy
2022-01-13  9:49       ` Cyril Hrubis
2022-01-13 14:22 ` Cyril Hrubis
2022-01-14  2:27   ` xuyang2018.jy

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=61E0F509.3090506@fujitsu.com \
    --to=xuyang2018.jy@fujitsu.com \
    --cc=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