[LTP] [PATCH 1/2] syscalls/tkill: Convert tkill01 to the new API
Petr Vorel
pvorel@suse.cz
Mon Apr 26 14:55:26 CEST 2021
> Hi,
> Thanks for your review, Petr.
> > + TEST(tst_syscall(__NR_tkill, tid, SIGUSR1));
> > + if (TST_RET == 0) {
> > + while (!sig_flag);
> This while loop is written to check whether the sighandler function captures the SIGUSR1 signal and set sig_flag to 1.
Oh, correct. But not sure if it's good to use plain while.
Maybe using usleep(1000) in while loop?
TST_EXP_PASS(tst_syscall(__NR_tkill, tid, SIGUSR1));
while (!sig_flag)
usleep(1000);
Kind regards,
Petr
> > + tst_res(TPASS, "tst_syscall(__NR_tkill, %d, SIGUSR1)", tid);
> > + } else {
> > + tst_res(TFAIL | TTERRNO,
> > + "tst_syscall(__NR_tkill, %d, SIGUSR1)", tid);
> > }
> > - cleanup();
> > - tst_exit();
> > }
More information about the ltp
mailing list