[LTP] [PATCH v3 2/2] sigpending/rt_sigpending: add basic test
Petr Vorel
pvorel@suse.cz
Tue Mar 19 17:58:57 CET 2019
Hi Matthias,
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> -static void run(void)
> -{
> - /* set sigset to point to an invalid location */
> - sigset_t *sigset = (sigset_t *) - 1;
> +#define min(x, y) (((x) < (y)) ? (x) : (y))
We have MIN() macro in include/tst_minmax.h.
> #if defined(TEST_SIGPENDING)
> - TEST(tst_syscall(__NR_sigpending, sigset));
> +#define tested_sigpending(sigset) TEST(tst_syscall(__NR_sigpending, sigset))
> #elif defined(TEST_RT_SIGPENDING)
> - TEST(tst_syscall(__NR_rt_sigpending, sigset, SIGSETSIZE));
> +#define tested_sigpending(sigset) \
> + TEST(tst_syscall(__NR_rt_sigpending, sigset, SIGSETSIZE))
> #else
> #error Neither TEST_SIGPENDING nor TEST_RT_SIGPENDING is defined!
> #endif
> +static int sighandler_counter = 0;
IMHO static is automatically 0, thus no assignment needed.
Kind regards,
Petr
More information about the ltp
mailing list