lkml.org 
[lkml]   [2017]   [Aug]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] selftests: futex: convert test to use ksft TAP13 framework
From
Date
On 08/05/2017 09:15 AM, Stafford Horne wrote:
> On Fri, Aug 04, 2017 at 06:46:50PM -0600, Shuah Khan wrote:
>> Convert test to use ksft TAP13 framework.
>
>
>> --- a/tools/testing/selftests/futex/include/logging.h
>> +++ b/tools/testing/selftests/futex/include/logging.h
>> @@ -109,22 +109,20 @@ void log_verbosity(int level)
>> */
>> void print_result(const char *test_name, int ret)
>> {
>> - const char *result = "Unknown return code";
>> -
>> switch (ret) {
>> case RET_PASS:
>> - ksft_inc_pass_cnt();
>> - result = PASS;
>> - break;
>> + ksft_test_result_pass("%s\n", test_name);
>> + ksft_print_cnts();
>> + return;
>> case RET_ERROR:
>> - result = ERROR;
>> - break;
>> + ksft_test_result_error("%s\n", test_name);
>> + ksft_print_cnts();
>> + return;
>
> This looks ok to me, but this function `ksft_test_result_error` was added
> in another patch you just sent, it was a bit hard to review.

thanks for the review.

>
> If you need to make and updates, could you please send a series next?

I should have sent it as a series in the first place. Sorry about that.

>
> -Stafford
>
>> case RET_FAIL:
>> - ksft_inc_fail_cnt();
>> - result = FAIL;
>> - break;
>> + ksft_test_result_fail("%s\n", test_name);
>> + ksft_print_cnts();
>> + return;
>> }
>> - printf("selftests: %s [%s]\n", test_name, result);
>
>
>

thanks,
-- Shuah

\
 
 \ /
  Last update: 2017-08-07 23:11    [W:0.059 / U:0.808 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site