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 4/4] syscalls/acct01: convert to new library
Date: Tue, 26 Mar 2019 17:11:55 +0100	[thread overview]
Message-ID: <20190326161154.GC11086@rei.lan> (raw)
In-Reply-To: <20190325232012.67123-5-sspatil@android.com>

Hi!
>  #define DIR_MODE	(S_IRUSR|S_IWUSR|S_IXUSR|S_IRGRP| \
>  			 S_IXGRP|S_IROTH|S_IXOTH)
> @@ -48,169 +28,106 @@
>  #define TEST_FILE5	"./tmpfile"
>  #define TEST_FILE6	"test_file_eloop1"
>  #define TEST_FILE7	nametoolong
> -#define TEST_FILE8	"mntpoint/tmp"
> +#define TEST_FILE8	"mntpoint/file"

Maybe it would be better to name these after the error they cause i.e.
FILE_EISDIR etc. Also some of these do point outside of the test
temporary directory and even if it's unlikely to mess up with the system
that way we should use "." instead of "/", create a file in PWD instead
of /etc/fstab/ etc.

...

> -	tst_rmdir();
> +	if (TST_ERR == tcase->exp_errno)
> +		tst_res(TPASS | TTERRNO, "acct() failed as expected");
> +	else
> +		tst_res(TFAIL | TTERRNO,
> +				"acct() failed, expected: %d - %s",
> +				tcase->exp_errno, strerror(tcase->exp_errno));

As in previous test you should use tst_strerrno() to print errno
instead.


Other than these two minor points the rest looks good.

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2019-03-26 16:11 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-25 23:20 [LTP] [PATCH 0/4] Convert tests to use new library Sandeep Patil
2019-03-25 23:20 ` [LTP] [RFC PATCH 1/4] syscalls/abort01: convert to " Sandeep Patil
2019-03-26 11:58   ` Cyril Hrubis
2019-03-26 12:47     ` Sandeep Patil
2019-03-26 12:51       ` Cyril Hrubis
2019-03-28  4:07         ` Sandeep Patil
2019-04-03 12:06           ` Cyril Hrubis
2019-04-03 15:49             ` Sandeep Patil
2019-03-25 23:20 ` [LTP] [PATCH 2/4] syscalls/accept01: " Sandeep Patil
2019-03-26 12:35   ` Cyril Hrubis
2019-03-26 12:44     ` Sandeep Patil
2019-03-25 23:20 ` [LTP] [PATCH 3/4] syscalls/accept4: " Sandeep Patil
2019-03-26 15:33   ` Cyril Hrubis
2019-03-25 23:20 ` [LTP] [PATCH 4/4] syscalls/acct01: " Sandeep Patil
2019-03-26 16:11   ` Cyril Hrubis [this message]
2019-03-26  9:42 ` [LTP] [PATCH 0/4] Convert tests to use " Cyril Hrubis
2019-03-26 12:48   ` Sandeep Patil

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=20190326161154.GC11086@rei.lan \
    --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