From: Xiao Yang <yangx.jy@cn.fujitsu.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 3/3] syscalls/sigpending02.c: Add libc sigpending() detection && reset sighandler_counter
Date: Fri, 5 Apr 2019 15:33:17 +0800 [thread overview]
Message-ID: <5CA704BD.3090804@cn.fujitsu.com> (raw)
In-Reply-To: <20190405072112.GB31213@dell5510>
On 2019/04/05 15:21, Petr Vorel wrote:
> Hi Xiao,
>
>> 1) bionic(Android libc) doesn't implement libc sigpending() currently,
>> so we can skip it on Android by the detection.
>> 2) Fix sigpending02 -i n by resetting sighandler_counter variable.
> Good catch, thanks!
>
>> Signed-off-by: Xiao Yang<yangx.jy@cn.fujitsu.com>
> Reviewed-by: Petr Vorel<pvorel@suse.cz>
>
> ...
>> +++ b/testcases/kernel/syscalls/sigpending/sigpending02.c
>> @@ -13,6 +13,7 @@
>> * Test 2: Call sigpending(sigset_t*=-1), it should return -1 with errno EFAULT.
>> */
>> +#include "config.h"
>> #include "tst_test.h"
>> #include "ltp_signal.h"
>> #include "lapi/syscalls.h"
>> @@ -36,7 +37,11 @@ static int tested_sigpending(sigset_t *sigset)
>> {
>> switch (tst_variant) {
>> case 0:
>> +#ifndef HAVE_SIGPENDING
>> + tst_brk(TCONF, "libc sigpending() is not implemented");
>> +#else
>> return sigpending(sigset);
>> +#endif
>> break;
> NOTE: I removed this break with 6d5b03aa9 ("Remove unnecessary breaks"),
> so you need to add it when rebasing this commit.
Hi Petr,
Sure, i will add it in v3 patch. :-)
Best Regards,
Xiao Yang
>
>> case 1:
>> return tst_syscall(__NR_sigpending, sigset);
>> @@ -60,6 +65,8 @@ static void test_sigpending(void)
>> int i; /* loop index */
>> + sighandler_counter = 0;
>> +
>> /* set up signal mask and handler */
>> sigset_t only_SIGUSR, old_mask;
>> sighandler_t old_sighandler1, old_sighandler2;
> Kind regards,
> Petr
>
>
> .
>
prev parent reply other threads:[~2019-04-05 7:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 3:09 [LTP] [PATCH v2 1/3] m4: Use common LTP_CHECK_LIBC_FUNCS to check libc implementations Xiao Yang
2019-04-05 3:09 ` [LTP] [PATCH v2 2/3] syscalls/stime: Add libc stime() detection Xiao Yang
2019-04-05 3:09 ` [LTP] [PATCH v2 3/3] syscalls/sigpending02.c: Add libc sigpending() detection && reset sighandler_counter Xiao Yang
2019-04-05 7:21 ` Petr Vorel
2019-04-05 7:33 ` Xiao Yang [this message]
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=5CA704BD.3090804@cn.fujitsu.com \
--to=yangx.jy@cn.fujitsu.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.