Skip to contentSkip to conversation

tools: fix compile error of freq-step.c

PATCH In review Thomas Richter 3 participants 3 messages Aug 16, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools: fix compile error of freq-step.c

The compilation of the file freq-step.c in directory tools/testing/selftests/timers fails with this error message:

[root@s8360046 timers]# make
gcc -O3 -Wl,-no-as-needed -Wall -DKTEST -lrt -lpthread -lm freq-step.c
-o freq-step
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:142:19: note: declared here
static inline int ksft_exit_skip(const char *msg, ...)

                   ^~~~~~~~~~~~~~

<builtin>: recipe for target 'freq-step' failed
make: *** [freq-step] Error 1
[root@s8360046 timers]#

This is the case for Intel and s390x. I have not tested other platforms.

Which this patch the compilation succeeds:

[root@s8360046 timers]# make
gcc -O3 -Wl,-no-as-needed -Wall -DKTEST -lrt -lpthread -lm freq-step.c -o freq-step
[root@s8360046 timers]# ./freq-step
CLOCK_MONOTONIC_RAW+CLOCK_MONOTONIC precision: 348 ns [SKIP]
1..0 # Skipped: [SKIP]
[root@s8360046 timers]#

---
 tools/testing/selftests/timers/freq-step.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/timers/freq-step.c +1 -1
index e8c6183..bda9744 100644
@@ -231,7 +231,7 @@ static void init_test(void)
 
 	if (precision > MAX_PRECISION) {
 		printf("[SKIP]\n");
-		ksft_exit_skip();
+		ksft_exit_skip("[SKIP]\n");
 	}
 
 	printf("[OK]\n");
Signature · 1 line
2.9.3
#1 lore raw
Quoted 14 lines · Thomas Richter

The compilation of the file freq-step.c in directory tools/testing/selftests/timers fails with this error message:

[root@s8360046 timers]# make
gcc -O3 -Wl,-no-as-needed -Wall -DKTEST -lrt -lpthread -lm freq-step.c
-o freq-step
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:142:19: note: declared here
 static inline int ksft_exit_skip(const char *msg, ...)
                   ^~~~~~~~~~~~~~
Quoted 8 lines

<builtin>: recipe for target 'freq-step' failed
make: *** [freq-step] Error 1
[root@s8360046 timers]#

This is the case for Intel and s390x. I have not tested other platforms.

Which this patch the compilation succeeds:

I think Shuah has already submitted a fix for this to Linus. I believe it was merged as 622b2fbe625b.

thanks
-john

#2 lore raw
Quoted 20 lines · John Stultz
Quoted 18 lines · Thomas Richter

The compilation of the file freq-step.c in directory tools/testing/selftests/timers fails with this error message:

[root@s8360046 timers]# make
gcc -O3 -Wl,-no-as-needed -Wall -DKTEST -lrt -lpthread -lm freq-step.c
-o freq-step
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:142:19: note: declared here
 static inline int ksft_exit_skip(const char *msg, ...)
                   ^~~~~~~~~~~~~~

<builtin>: recipe for target 'freq-step' failed
make: *** [freq-step] Error 1
[root@s8360046 timers]#

Quoted 8 lines
Quoted 4 lines

This is the case for Intel and s390x. I have not tested other platforms.

Which this patch the compilation succeeds:

I think Shuah has already submitted a fix for this to Linus. I believe it was merged as 622b2fbe625b.

Yes. It has been merged into mainline yesterday for 4.13-rc6

thanks,
-- Shuah