public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v3 1/2] rt_sigpending02: reuse code from sigpending02
Date: Tue, 19 Mar 2019 17:44:16 +0100	[thread overview]
Message-ID: <20190319164416.GA14664@dell5510> (raw)
In-Reply-To: <20190319113153.13436-2-maennich@google.com>

Hi Matthias,

Reviewed-by: Petr Vorel <pvorel@suse.cz>

...
>  static void run(void)
> @@ -24,20 +28,26 @@ static void run(void)
>  	/* set sigset to point to an invalid location */
>  	sigset_t *sigset = (sigset_t *) - 1;
There is (undocumented) library helper tst_get_bad_addr() which might bring some
arch portability.

> +#if defined(TEST_SIGPENDING)
>  	TEST(tst_syscall(__NR_sigpending, sigset));
BTW: Looking into this, which I merged in 63f8a3f77 ("sigpending: use direct
syscall") removed testing sigpending() glibc wrapper from intel. Now:
sigpending02.c:67: CONF: syscall(-1) __NR_sigpending not supported
@Cyril, is it ok for us?
I guess, we should do something about #506 [1] to solve problems like this.

> +#elif defined(TEST_RT_SIGPENDING)
> +	TEST(tst_syscall(__NR_rt_sigpending, sigset, SIGSETSIZE));
> +#else
> +#error Neither TEST_SIGPENDING nor TEST_RT_SIGPENDING is defined!
> +#endif

>  	/* check return code */
>  	if (TST_RET == -1) {
>  		if (TST_ERR != EFAULT) {
>  			tst_res(TFAIL | TTERRNO,
> -				"sigpending() Failed with wrong errno, "
> +				"syscall failed with wrong errno, "
>  				"expected errno=%d, got ", EFAULT);
I'd join this string. + trailing space after got.

>  		} else {
>  			tst_res(TPASS | TTERRNO, "expected failure");
>  		}
>  	} else {
>  		tst_res(TFAIL,
> -			"sigpending() Failed, expected return value=-1, got %ld", TST_RET);
> +			"syscall failed, expected return value=-1, got %ld", TST_RET);
>  	}
>  }

Kind regards,
Petr

[1] https://github.com/linux-test-project/ltp/issues/506

  reply	other threads:[~2019-03-19 16:44 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-08 16:38 [LTP] [PATCH v1] rt_sigpending02: reuse code from sigpending02 Matthias Maennich
2019-03-12 17:11 ` Steve Muckle
2019-03-13  9:42   ` Cyril Hrubis
2019-03-13 11:42     ` Matthias Maennich
2019-03-13 16:31       ` Steve Muckle
2019-03-13 12:02 ` [LTP] [PATCH v2 0/2] new test cases for sigpending / rt_sigpending Matthias Maennich
2019-03-13 12:02   ` [LTP] [PATCH v2 1/2] rt_sigpending02: reuse code from sigpending02 Matthias Maennich
2019-03-13 12:02   ` [LTP] [PATCH v2 2/2] sigpending/rt_sigpending: add basic test Matthias Maennich
2019-03-19  0:04     ` Steve Muckle
2019-03-19 11:31 ` [LTP] [PATCH v3 0/2] new test cases for sigpending / rt_sigpending Matthias Maennich
2019-03-19 11:31   ` [LTP] [PATCH v3 1/2] rt_sigpending02: reuse code from sigpending02 Matthias Maennich
2019-03-19 16:44     ` Petr Vorel [this message]
2019-03-19 16:52       ` Petr Vorel
2019-03-19 11:31   ` [LTP] [PATCH v3 2/2] sigpending/rt_sigpending: add basic test Matthias Maennich
2019-03-19 16:58     ` Petr Vorel
2019-03-19 17:24     ` Petr Vorel
2019-03-19 18:41 ` [LTP] [PATCH v4 0/3] rt_sigpending02: reuse code from sigpending02 Matthias Maennich
2019-03-19 18:41   ` [LTP] [PATCH v4 1/3] " Matthias Maennich
2019-03-19 18:41   ` [LTP] [PATCH v4 2/3] sigpending/rt_sigpending: add basic test Matthias Maennich
2019-03-19 18:41   ` [LTP] [PATCH v4 3/3] sigpending: improve portability by using tst_get_bad_addr() Matthias Maennich
2019-03-21 18:50   ` [LTP] [PATCH v4 0/3] rt_sigpending02: reuse code from sigpending02 Petr Vorel

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=20190319164416.GA14664@dell5510 \
    --to=pvorel@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