[LTP] [PATCH v3 1/5] syscalls/quotactl01.c: Add Q_GETNEXQUOTA test

Petr Vorel pvorel@suse.cz
Wed Nov 20 18:09:48 CET 2019


Hi Xu,

> >>  	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");
> >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.
> 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

+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).

Kind regards,
Petr


More information about the ltp mailing list