public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Subrata Modak <subrata@linux.vnet.ibm.com>
To: Chandru <chandru@in.ibm.com>
Cc: ltp-list@lists.sourceforge.net, vapier@gentoo.org
Subject: Re: [LTP] [PATCH V2] ppoll01: add signal() syscall to register the	signal handler
Date: Thu, 15 Oct 2009 01:58:54 +0530	[thread overview]
Message-ID: <1255552134.4892.12.camel@subratamodak.linux.ibm.com> (raw)
In-Reply-To: <200910141211.11379.chandru@in.ibm.com>

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 <chandru@linux.vnet.ibm.com>
> > 
> > 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 <chandru@linux.vnet.ibm.com>

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();


------------------------------------------------------------------------------
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
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2009-10-14 20:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-01  8:10 [LTP] [PATCH V2] ppoll01: add signal() syscall to register the signal handler Chandru
2009-10-13 12:13 ` Subrata Modak
2009-10-14  6:41   ` Chandru
2009-10-14 20:28     ` Subrata Modak [this message]
2009-10-15  1:25       ` Garrett Cooper
2009-10-15  8:44         ` Chandru
2009-10-15 12:43           ` Garrett Cooper
2009-10-15 12:45             ` Garrett Cooper

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=1255552134.4892.12.camel@subratamodak.linux.ibm.com \
    --to=subrata@linux.vnet.ibm.com \
    --cc=chandru@in.ibm.com \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=vapier@gentoo.org \
    /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