<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">
<pre>on 2019/11/21 1:09, Petr Vorel wrote:</pre>
</div>
<blockquote type="cite" cite="mid:20191120170948.GA7010@dell5510">
<pre class="moz-quote-pre" wrap="">Hi Xu,
</pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre class="moz-quote-pre" wrap=""> TEST(quotactl(tc->cmd, tst_device->dev, *tc->id, tc->addr));
+ if (TST_ERR == EINVAL) {
+ tst_res(TCONF, "Current system doesn't support this cmd");
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">nit: cmd? Maybe something like "quotactl() syscall does not support this command"
or "quotactl() syscall does not support to %s", tc->des to follow other messages. I'd actually prefer to have some macro, which prints QCMD flags, but that's a detail which we can >ignore.
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">I think we can add some info before each run (such as prctl02.c and copy_file_range02.c, make error cases more clear ), as below:
tst_res(TINFO, "Test #%d: %s", n, tc->tname); // this tname is a QCMD_string
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
+1. It could use similar approach as it's in testcases/kernel/syscalls/mbind/mbind01.c
#define POLICY_DESC(x) .policy = x, .desc = #x
#define POLICY_DESC_TEXT(x, y) .policy = x, .desc = #x" ("y")"
static struct test_case tcase[] = {
{
POLICY_DESC(MPOL_DEFAULT),
...
},
{
POLICY_DESC_TEXT(MPOL_DEFAULT, "target exists"),
But I'd prefer to have it as a separate patch after v4 of this patchset is merged.
I'd prefer to finish v4 (I've already fixed small formatting things, I can fix
the rest of needed things myself).</pre>
</blockquote>
<pre>Hi Petr
</pre>
<pre> Using a macro is a better way.
Thanks
Yang Xu
</pre>
<blockquote type="cite" cite="mid:20191120170948.GA7010@dell5510">
<pre class="moz-quote-pre" wrap="">
Kind regards,
Petr
</pre>
</blockquote>
</body>
</html>