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 08:15 PM, Paul Elder wrote:
> On 06/15/2017 10:56 AM, Shuah Khan wrote:
>> On 06/14/2017 07:26 PM, Paul Elder wrote:
>>> On 06/15/2017 09:28 AM, 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftestanything.org%2Ftap-version-13-specification.html&data=01%7C01%7Cpaul.elder%40pitt.edu%7C58a5011baeaa4a61f2da08d4b385709d%7C9ef9f489e0a04eeb87cc3a526112fd0d%7C1&sdata=dxLpItTcxfm1MA4jCrallXtDFC7FsPyYTnUJDa0AORw%3D&reserved=0
>>>>>
>>>>> "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.
>>>>  -- Tim
>>>>
>>> That sounds reasonable to me too. At the moment I have put in message output
>>> for skipping individual tests, but you are right that ksft_exit_skip() does
>>> not output any message at the moment. Since it's part of kselftests.h, I could
>>> take care of it in the next revision, with Tim's suggested implementation.

Yes go ahead and do that.

>>>
>>> I'm not sure what the specification means by outputting the count of skipped
>>> tests, though.
>>>
>>
>> I think it is the skip count we already have.
> I know we have counts of all the outcomes, but the only thing that is outputted
> at the end is how many tests occurred. If all the tests are skipped then 1..0
> would indeed be outputted. If some tests are skipped then those tests would be
> included in the total test count at the end.
> 

I think what the above specification is saying is Skip message should print the
test number that is being skipped. The total number of test at this time would
be the current test number when ksft_exit_skip() is called.

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