On Wed, Oct 14, 2009 at 1:28 PM, Subrata Modak <[email protected]> wrote: > On Wed, 2009-10-14 at 12:11 +0530, Chandru wrote: >> On Tuesday 13 October 2009 17:43:37 Subrata Modak wrote: >> > On Thu, 2009-10-01 at 13:40 +0530, Chandru wrote: >> > > The ppoll01 testcase has a signal handler in it but this signal handler >> > > is not registered with the kernel through the signal() syscall. The >> > > testcase fails when it sends a SIGINT to itself as part of one of the >> > > case of the test run. >> > > The following patch >> > > 1. Adds a signal() syscall to register the signal handler >> > > 2. Corrects the expected 'revents' for the case where ppoll() is called >> > > on a file which is only opened in read/write mode, i.e case00. >> > > >> > > Signed-off-by: Chandru S <[email protected]> >> > >> > Hi Chandru, >> > >> > Can you please resend this with a diff from the Latest CVS snapshot ? >> > >> >> Hi Subrata, >> >> Thanks for letting me know. Here is the patch taken from the latest snapshot. >> >> The following patch adds a signal() syscall to the ppoll01 testcase. The >> testcase has a signal handler in it but this signal handler is not >> registered with the kernel through the signal() syscall. Without the patch >> the testcase fails when it sends a SIGINT to itself as part of one of the >> case of the test run. >> >> Signed-off-by: Chandru S <[email protected]> > > Thanks. > > Regards-- > Subrata > >> --- >> >> --- ltp/testcases/kernel/syscalls/ppoll/ppoll01.c.orig 2009-10-14 >> 16:58:45.547235527 +0530 >> +++ ltp/testcases/kernel/syscalls/ppoll/ppoll01.c 2009-10-14 >> 16:53:42.828486675 +0530 >> @@ -106,6 +106,8 @@ extern void cleanup() { >> tst_exit(); >> } >> >> +void sighandler(int sig); /* signals handler function for the test */ >> + >> /* Local Functions */ >> /******************************************************************************/ >> /* >> */ >> @@ -126,6 +128,8 @@ extern void cleanup() { >> /******************************************************************************/ >> void setup() { >> /* Capture signals if any */ >> + signal(SIGINT, &sighandler); >> + >> /* Create temporary directories */ >> TEST_PAUSE; >> tst_tmpdir();
Just curious -- was the issue seen at the following point in the code previously? 361 TEST(sys_ret = syscall(__NR_ppoll, p_fds, nfds, p_ts, p_sigmask, sigsetsize)); /* <-- Blocks here indefinitely */ 362 sys_errno = errno; 363 if (sys_ret <= 0 || tc->ret < 0) 364 goto TEST_END; 365 366 cmp_ok = fds[0].revents == tc->expect_revents; I've seen this issue 1 out of the 8 or 9 times I've run this test. Thanks! -Garrett ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
