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 v2 01/10] getitimer02 : Convert getitimer02 to new API
Date: Fri, 11 Jun 2021 15:41:43 +0200	[thread overview]
Message-ID: <YMNoFyN89L6/VhP3@yuki> (raw)
In-Reply-To: <20210609173601.29352-1-vinay.m.engg@gmail.com>

Hi!
>  		/* call with a bad address */
>  		TEST(getitimer(ITIMER_REAL, (struct itimerval *)-1));
>  

Can we please make use of TST_EXP_FAIL() here instead?

> -		if (TEST_RETURN == 0) {
> -			tst_resm(TFAIL, "call failed to produce "
> -				 "expected error - errno = %d - %s",
> -				 TEST_ERRNO, strerror(TEST_ERRNO));
> -			continue;
> +		if (TST_RET == 0) {
> +			tst_res(TFAIL, "call failed to produce "
> +				"expected error - errno = %d - %s",
> +				TST_ERR, strerror(TST_ERR));
>  		}
>  
> -		switch (TEST_ERRNO) {
> +		switch (TST_ERR) {
>  		case EFAULT:
> -			tst_resm(TPASS, "expected failure - errno = %d - %s",
> -				 TEST_ERRNO, strerror(TEST_ERRNO));
> +			tst_res(TPASS, "expected failure - errno = %d - %s",
> +				 TST_ERR, strerror(TST_ERR));
>  			break;
>  		default:
> -			tst_resm(TFAIL, "call failed to produce "
> -				 "expected error - errno = %d - %s",
> -				 TEST_ERRNO, strerror(TEST_ERRNO));
> +			tst_res(TFAIL, "call failed to produce "
> +					"expected error - errno = %d - %s",
> +					TST_ERR, strerror(TST_ERR));

And can we please have a proper indentation here from the start instead
of fixing that in subsequent patches?

> -#endif /* if !defined(UCLINUX) */
> +static struct tst_test test = {
> +			.test_all = verify_getitimer,
> +			.needs_root = 1,

And here as well.

-- 
Cyril Hrubis
chrubis@suse.cz

  parent reply	other threads:[~2021-06-11 13:41 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 10:45 [LTP] [PATCH 1/7] getitimer02: Skipped EFAULT tests for libc variant Vinay Kumar
2021-06-07 10:45 ` [LTP] [PATCH 2/7] getrusage02: " Vinay Kumar
2021-06-07 10:45 ` [LTP] [PATCH 3/7] msgctl04: " Vinay Kumar
2021-06-07 10:45 ` [LTP] [PATCH 4/7] semctl03: " Vinay Kumar
2021-06-07 10:45 ` [LTP] [PATCH 5/7] shmctl02: " Vinay Kumar
2021-06-07 10:45 ` [LTP] [PATCH 6/7] sched_rr_get_interval03: " Vinay Kumar
2021-06-07 10:45 ` [LTP] [PATCH 7/7] setitimer02: " Vinay Kumar
2021-06-08 20:43 ` [LTP] [PATCH 1/7] getitimer02: " Petr Vorel
2021-06-09 17:35   ` [LTP] [PATCH v2 01/10] getitimer02 : Convert getitimer02 to new API Vinay Kumar
2021-06-09 17:35     ` [LTP] [PATCH v2 02/10] getitimer02: Skipped EFAULT tests for libc variant Vinay Kumar
2021-06-11 13:43       ` Cyril Hrubis
2021-06-13 16:54         ` [LTP] [PATCH v3] " Vinay Kumar
2021-06-14 14:22           ` Cyril Hrubis
2021-06-09 17:35     ` [LTP] [PATCH v2 03/10] getrusage02: Convert getrusage02 to new API Vinay Kumar
2021-06-11 13:49       ` Cyril Hrubis
2021-06-13 17:12         ` [LTP] [PATCH v3] " Vinay Kumar
2021-06-09 17:35     ` [LTP] [PATCH v2 04/10] getrusage02: Skipped EFAULT tests for libc variant Vinay Kumar
2021-06-11 13:50       ` Cyril Hrubis
2021-06-13 17:16         ` [LTP] [PATCH v3] " Vinay Kumar
2021-06-14 14:37           ` Cyril Hrubis
2021-06-14 15:14             ` Vinay Kumar
2021-06-14 14:52               ` Cyril Hrubis
2021-06-09 17:35     ` [LTP] [PATCH v2 05/10] setitimer02: Convert setitimer02 to new API Vinay Kumar
2021-06-11 13:57       ` Cyril Hrubis
2021-06-13 17:30         ` [LTP] [PATCH v3] " Vinay Kumar
2021-06-14 14:44           ` Cyril Hrubis
2021-06-09 17:35     ` [LTP] [PATCH v2 06/10] setitimer02: Skipped EFAULT tests for libc variant Vinay Kumar
2021-06-11 14:00       ` Cyril Hrubis
2021-06-13 17:35         ` [LTP] [PATCH v3] " Vinay Kumar
2021-06-14 14:47           ` Cyril Hrubis
2021-06-09 17:35     ` [LTP] [PATCH v2 07/10] msgctl04: " Vinay Kumar
2021-06-11 14:13       ` Cyril Hrubis
2021-06-09 17:35     ` [LTP] [PATCH v2 08/10] semctl03 :Skipped " Vinay Kumar
2021-06-17 11:34       ` Cyril Hrubis
2021-06-09 17:36     ` [LTP] [PATCH v2 09/10] sched_rr_get_interval03: Skipped " Vinay Kumar
2021-06-11 14:36       ` Cyril Hrubis
2021-06-09 17:36     ` [LTP] [PATCH v2 10/10] shmctl02 :Skipped " Vinay Kumar
2021-06-13 17:49       ` [LTP] [PATCH v3] ipc/shmctl02: Make use of TST_EXP_FAIL() Vinay Kumar
2021-06-14 15:55         ` Vinay Kumar
2021-06-17 11:40         ` Cyril Hrubis
2021-06-17 11:38       ` [LTP] [PATCH v2 10/10] shmctl02 :Skipped EFAULT tests for libc variant Cyril Hrubis
2021-06-11 13:41     ` Cyril Hrubis [this message]
2021-06-13 16:43       ` [LTP] [PATCH v3] getitimer02: Convert getitimer02 to new API Vinay Kumar
2021-06-14 14:19         ` Cyril Hrubis
2021-06-09 17:38   ` [LTP] [PATCH 1/7] getitimer02: Skipped EFAULT tests for libc variant Vinay Kumar

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=YMNoFyN89L6/VhP3@yuki \
    --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