Re: [LTP] [PATCH] ppoll01: add signal() syscall to register the signal handler

Garrett Cooper
2009-09-25T05:24:46Z

On Thu, Sep 24, 2009 at 1:28 PM, K.D. Lucas <kdlucas@gmail.com> wrote:
> I applied this patch, and it fixed ppoll01 on an Ubuntu Hardy box which had
> been failing. Kernel is 2.6.24.
>
> Kelly
>
> On Wed, Sep 23, 2009 at 11:59 PM, Chandru <chandru@in.ibm.com> wrote:
>>
>> The ppoll01 testcase has a signal handler in it but this signal handler is
>> not registered with the kernel through the signal() syscal. 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.
>> 3. Takes away printing the type of error ( i.e strerror(errno) ) since it
>> only prints the last error seen and does not report the failures seen in the
>> cases before the last failed one. The reporting of NG or OK shoudl take care
>> of
>>    letting the user know the cases that have passed and cases that have
>> failed.
>>
>> Signed-off-by: Chandru S <chandru@linux.vnet.ibm.com>

...

>>                default:
>> -                               tst_resm(TFAIL, "%s failed - errno = %d :
>> %s", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
>> +                               tst_resm(TFAIL, "%s failed", TCID);
>>                                RPRINTF("NG");
>>                                cleanup();
>>                                tst_exit();

Please don't change that line.
Thanks,
-Garrett