From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v1 3/4] syscalls/pidfd_send_signal02
Date: Tue, 28 May 2019 13:38:47 +0200 [thread overview]
Message-ID: <20190528113847.GB14548@rei> (raw)
In-Reply-To: <20190515120116.11589-3-camann@suse.com>
Hi!
> +static void verify_pidfd_send_signal(unsigned int n)
> +{
> + struct tcase *tc = &tcases[n];
> +
> + TEST(tst_pidfd_send_signal(*tc->fd, tc->signal, tc->siginf, tc->flags));
> + if (tc->exp_err != TST_ERR) {
> + tst_res(TFAIL | TTERRNO,
> + "pidfd_send_signal() did not fail with %s but",
> + tst_strerrno(tc->exp_err));
> + return;
> + }
> +
> + tst_res(TPASS,
> + "pidfd_send_signal() failed as expected!");
I tend to pass TTERRNO to the passing message for negative testcases
like this one so that the output has some information about what has
been tested.
I would have done something as here:
tst_res(TPASS | TTERRNO, "pidfd_send_signal() failed");
Other than this the test looks good.
--
Cyril Hrubis
chrubis@suse.cz
next prev parent reply other threads:[~2019-05-28 11:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-15 12:01 [LTP] [PATCH v1 1/4] Add Syscall numbers for pidfd_send_signal Christian Amann
2019-05-15 12:01 ` [LTP] [PATCH v1 2/4] syscalls/pidfd_send_signal01 Christian Amann
2019-05-28 11:30 ` Cyril Hrubis
2019-05-15 12:01 ` [LTP] [PATCH v1 3/4] syscalls/pidfd_send_signal02 Christian Amann
2019-05-28 11:38 ` Cyril Hrubis [this message]
2019-05-15 12:01 ` [LTP] [PATCH v1 4/4] syscalls/pidfd_send_signal03 Christian Amann
2019-05-28 13:22 ` Cyril Hrubis
2019-05-15 12:44 ` [LTP] [PATCH v1 1/4] Add Syscall numbers for pidfd_send_signal 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=20190528113847.GB14548@rei \
--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