2017-08-09 22:05:16

by Shuah Khan

[permalink] [raw]
Subject: [PATCH] selftests: timers: freq-step: fix compile error

Fix compile error due to ksft_exit_skip() update to take var_args.

freq-step.c: In function ‘init_test’:
freq-step.c:234:3: error: too few arguments to function ‘ksft_exit_skip’
ksft_exit_skip();
^~~~~~~~~~~~~~
In file included from freq-step.c:26:0:
../kselftest.h:167:19: note: declared here
static inline int ksft_exit_skip(const char *msg, ...)
^~~~~~~~~~~~~~
<builtin>: recipe for target 'freq-step' failed

Signed-off-by: Shuah Khan <[email protected]>
---
tools/testing/selftests/timers/freq-step.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/tools/testing/selftests/timers/freq-step.c b/tools/testing/selftests/timers/freq-step.c
index e8c61830825a..22312eb4c941 100644
--- a/tools/testing/selftests/timers/freq-step.c
+++ b/tools/testing/selftests/timers/freq-step.c
@@ -229,10 +229,9 @@ static void init_test(void)
printf("CLOCK_MONOTONIC_RAW+CLOCK_MONOTONIC precision: %.0f ns\t\t",
1e9 * precision);

- if (precision > MAX_PRECISION) {
- printf("[SKIP]\n");
- ksft_exit_skip();
- }
+ if (precision > MAX_PRECISION)
+ ksft_exit_skip("precision: %.0f ns > MAX_PRECISION: %.0f ns\n",
+ 1e9 * precision, 1e9 * MAX_PRECISION);

printf("[OK]\n");
srand(ts.tv_sec ^ ts.tv_nsec);
--
2.11.0


2017-08-14 20:12:36

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH] selftests: timers: freq-step: fix compile error

On Wed, Aug 9, 2017 at 3:05 PM, Shuah Khan <[email protected]> wrote:
> Fix compile error due to ksft_exit_skip() update to take var_args.
>
> freq-step.c: In function ‘init_test’:
> freq-step.c:234:3: error: too few arguments to function ‘ksft_exit_skip’
> ksft_exit_skip();
> ^~~~~~~~~~~~~~
> In file included from freq-step.c:26:0:
> ../kselftest.h:167:19: note: declared here
> static inline int ksft_exit_skip(const char *msg, ...)
> ^~~~~~~~~~~~~~
> <builtin>: recipe for target 'freq-step' failed
>
> Signed-off-by: Shuah Khan <[email protected]>


Acked-by: John Stultz <[email protected]>

This is a build regression in 4.13-rc so should go-to Linus promptly.

(Shuah: Let me know if you want me to send this in via Thomas, or you
want to send it in directly)

thanks
-john

2017-08-14 20:17:58

by Shuah Khan

[permalink] [raw]
Subject: Re: [PATCH] selftests: timers: freq-step: fix compile error

On 08/14/2017 02:12 PM, John Stultz wrote:
> On Wed, Aug 9, 2017 at 3:05 PM, Shuah Khan <[email protected]> wrote:
>> Fix compile error due to ksft_exit_skip() update to take var_args.
>>
>> freq-step.c: In function ‘init_test’:
>> freq-step.c:234:3: error: too few arguments to function ‘ksft_exit_skip’
>> ksft_exit_skip();
>> ^~~~~~~~~~~~~~
>> In file included from freq-step.c:26:0:
>> ../kselftest.h:167:19: note: declared here
>> static inline int ksft_exit_skip(const char *msg, ...)
>> ^~~~~~~~~~~~~~
>> <builtin>: recipe for target 'freq-step' failed
>>
>> Signed-off-by: Shuah Khan <[email protected]>
>
>
> Acked-by: John Stultz <[email protected]>
>
> This is a build regression in 4.13-rc so should go-to Linus promptly.
>
> (Shuah: Let me know if you want me to send this in via Thomas, or you
> want to send it in directly)
>
> thanks
> -john
>

John,

I am planning to send it to Linus with a few other fixes in linux-kselftest
fixes branch for 4.13-rc6

thanks,
-- Shuah

2017-08-14 20:34:16

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH] selftests: timers: freq-step: fix compile error

On Mon, Aug 14, 2017 at 1:17 PM, Shuah Khan <[email protected]> wrote:
> On 08/14/2017 02:12 PM, John Stultz wrote:
>> On Wed, Aug 9, 2017 at 3:05 PM, Shuah Khan <[email protected]> wrote:
>>> Fix compile error due to ksft_exit_skip() update to take var_args.
>>>
>>> freq-step.c: In function ‘init_test’:
>>> freq-step.c:234:3: error: too few arguments to function ‘ksft_exit_skip’
>>> ksft_exit_skip();
>>> ^~~~~~~~~~~~~~
>>> In file included from freq-step.c:26:0:
>>> ../kselftest.h:167:19: note: declared here
>>> static inline int ksft_exit_skip(const char *msg, ...)
>>> ^~~~~~~~~~~~~~
>>> <builtin>: recipe for target 'freq-step' failed
>>>
>>> Signed-off-by: Shuah Khan <[email protected]>
>>
>>
>> Acked-by: John Stultz <[email protected]>
>>
>> This is a build regression in 4.13-rc so should go-to Linus promptly.
>>
>> (Shuah: Let me know if you want me to send this in via Thomas, or you
>> want to send it in directly)
>>
>> thanks
>> -john
>>
>
> John,
>
> I am planning to send it to Linus with a few other fixes in linux-kselftest
> fixes branch for 4.13-rc6

Great! Thanks again for sending this out and sorry for not replying sooner!

-john

2017-08-14 20:59:27

by John Stultz

[permalink] [raw]
Subject: Re: [PATCH] selftests: timers: freq-step: fix compile error

On Mon, Aug 14, 2017 at 1:17 PM, Shuah Khan <[email protected]> wrote:
> On 08/14/2017 02:12 PM, John Stultz wrote:
>> On Wed, Aug 9, 2017 at 3:05 PM, Shuah Khan <[email protected]> wrote:
>>> Fix compile error due to ksft_exit_skip() update to take var_args.
>>>
>>> freq-step.c: In function ‘init_test’:
>>> freq-step.c:234:3: error: too few arguments to function ‘ksft_exit_skip’
>>> ksft_exit_skip();
>>> ^~~~~~~~~~~~~~
>>> In file included from freq-step.c:26:0:
>>> ../kselftest.h:167:19: note: declared here
>>> static inline int ksft_exit_skip(const char *msg, ...)
>>> ^~~~~~~~~~~~~~
>>> <builtin>: recipe for target 'freq-step' failed
>>>
>>> Signed-off-by: Shuah Khan <[email protected]>
>>
>>
>> Acked-by: John Stultz <[email protected]>
>>
>> This is a build regression in 4.13-rc so should go-to Linus promptly.
>>
>> (Shuah: Let me know if you want me to send this in via Thomas, or you
>> want to send it in directly)
>>
>> thanks
>> -john
>>
>
> John,
>
> I am planning to send it to Linus with a few other fixes in linux-kselftest
> fixes branch for 4.13-rc6

I also have two more less critical build fixups to that test to add,
which I'll send out here in a second for review.

thanks
-john