Re: [PATCH v2 1/4] kselftest: add TAP13 conformant versions of ksft_* functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/14/2017 06:28 PM, Bird, Timothy wrote:
> 
> 
>> -----Original Message-----
>> From: Shuah Khan on Thursday, June 15, 2017 9:15 AM
>>
>> Hi Tim/Paul,
>>
>> On 06/13/2017 08:46 PM, Paul Elder wrote:
>>> On 06/14/2017 04:50 AM, Shuah Khan wrote:
>>
>> snip - removed the rest.
>>
>>>>>     >> +
>>>>>     >>  static inline int ksft_exit_skip(void)
>>>>>     >>  {
>>>>>     >> +    ksft_print_cnts();
>>>>>     >>      exit(KSFT_SKIP);
>>>>>     >>  }
>>
>> I started working on porting breakpoints/breakpoint_test_arm64.c
>> test for two reasons:
>>
>> 1. I do have a arm board to test the changes
>> 2. I want to give the API a test drive and get a feel for it.
>>
>> Looks TAP13 says SKIP reason should be reported.
>>
>> https://testanything.org/tap-version-13-specification.html
>>
>> "Skipping tests
>> If the directive starts with # SKIP, the test is counted as having been skipped.
>> If the whole test file succeeds, the count of skipped tests is included in the
>> generated output. The harness should report the text after # SKIP\S*\s+ as a
>> reason for skipping.
>>
>> ok 23 # skip Insufficient flogiston pressure.
>> Similarly, one can include an explanation in a plan line, emitted if the test
>> file is skipped completely:
>>
>> 1..0 # Skipped: WWW::Mechanize not installed"
>>
>> If I am reading the above correctly, ksft_exit_skip() should print
>> reason for skipping, i which case, it can just be changed to take
>> msg buffer.
>>
>> I can make that change when I send in the
>> breakpoints/breakpoint_test_arm64.c
>> port.
>>
>> Does that sound reasonable to you or am I reading it wrong?
> 
> That sounds right to me. IMHO I don't believe that the specification
> is explicit that the skip string is required (but different people might
> read this differently). Therefore I would make the argument optional
> (meaning that if the user provides a NULL argument, then
> no reason string is added to the skip line).  However, I think you can have 
> whatever rules you want for kselftest.  If you want to mandate that
> a reason is provided for the skip when a caller uses this API, then I
> think that's reasonable also.

It is important for kselftest for tests to print skip reason. In many cases,
a test might not run on an older kernel because it depends on an unsupported
feature. I would say a NULL Skip string would be out of the ordinary.

thanks,
-- Shuah


--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux