All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2017-10-28 13:46 Mathieu Desnoyers
  2017-11-01 21:33 ` Shuah Khan
  0 siblings, 1 reply; 20+ messages in thread
From: Mathieu Desnoyers @ 2017-10-28 13:46 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel, Mathieu Desnoyers, linux-kselftest

Within run_tests target, the whole script needs to be executed within
the same shell and not as separate subshells, so the initial test_num
variable set to 0 is still present when executing "test_num=`echo
$$test_num+1 | bc`;".

Demonstration of the issue (make run_tests):

TAP version 13
(standard_in) 1: syntax error
selftests: basic_test
========================================
ok 1.. selftests: basic_test [PASS]
(standard_in) 1: syntax error
selftests: basic_percpu_ops_test
========================================
ok 1.. selftests: basic_percpu_ops_test [PASS]
(standard_in) 1: syntax error
selftests: param_test
========================================
ok 1.. selftests: param_test [PASS]

With fix applied:

TAP version 13
selftests: basic_test
========================================
ok 1..1 selftests: basic_test [PASS]
selftests: basic_percpu_ops_test
========================================
ok 1..2 selftests: basic_percpu_ops_test [PASS]
selftests: param_test
========================================
ok 1..3 selftests: param_test [PASS]

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fixes: 1f87c7c15d7 ("selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format")
CC: Shuah Khan <shuahkh@osg.samsung.com>
CC: linux-kselftest@vger.kernel.org
---
 tools/testing/selftests/lib.mk | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index f65886af7c0c..40057215e0da 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -20,9 +20,9 @@ all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
 
 .ONESHELL:
 define RUN_TESTS
-	@test_num=`echo 0`;
-	@echo "TAP version 13";
-	@for TEST in $(1); do				\
+	@test_num=`echo 0`;				\
+	echo "TAP version 13";				\
+	for TEST in $(1); do				\
 		BASENAME_TEST=`basename $$TEST`;	\
 		test_num=`echo $$test_num+1 | bc`;	\
 		echo "selftests: $$BASENAME_TEST";	\
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2017-10-28 13:46 [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script Mathieu Desnoyers
@ 2017-11-01 21:33 ` Shuah Khan
  2017-11-01 22:22   ` Mathieu Desnoyers
  0 siblings, 1 reply; 20+ messages in thread
From: Shuah Khan @ 2017-11-01 21:33 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: linux-kernel, linux-kselftest, Shuah Khan, Shuah Khan

On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
> Within run_tests target, the whole script needs to be executed within
> the same shell and not as separate subshells, so the initial test_num
> variable set to 0 is still present when executing "test_num=`echo
> $$test_num+1 | bc`;".
> 
> Demonstration of the issue (make run_tests):
> 
> TAP version 13
> (standard_in) 1: syntax error
> selftests: basic_test
> ========================================
> ok 1.. selftests: basic_test [PASS]
> (standard_in) 1: syntax error
> selftests: basic_percpu_ops_test
> ========================================
> ok 1.. selftests: basic_percpu_ops_test [PASS]
> (standard_in) 1: syntax error
> selftests: param_test
> ========================================
> ok 1.. selftests: param_test [PASS]

Hi Mathieu,

Odd. I don't see the error. I am curious if this specific to
env. Can you reproduce this with one of the existing tests,
kcmp or breakpoints

> 
> With fix applied:
> 
> TAP version 13
> selftests: basic_test
> ========================================
> ok 1..1 selftests: basic_test [PASS]
> selftests: basic_percpu_ops_test
> ========================================
> ok 1..2 selftests: basic_percpu_ops_test [PASS]
> selftests: param_test
> ========================================
> ok 1..3 selftests: param_test [PASS]
> 
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
> Fixes: 1f87c7c15d7 ("selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format")
> CC: Shuah Khan <shuahkh@osg.samsung.com>
> CC: linux-kselftest@vger.kernel.org
> ---

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2017-11-01 21:33 ` Shuah Khan
@ 2017-11-01 22:22   ` Mathieu Desnoyers
  2017-11-01 22:24     ` Mathieu Desnoyers
  0 siblings, 1 reply; 20+ messages in thread
From: Mathieu Desnoyers @ 2017-11-01 22:22 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel, linux-kselftest, shuah

----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:

> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>> Within run_tests target, the whole script needs to be executed within
>> the same shell and not as separate subshells, so the initial test_num
>> variable set to 0 is still present when executing "test_num=`echo
>> $$test_num+1 | bc`;".
>> 
>> Demonstration of the issue (make run_tests):
>> 
>> TAP version 13
>> (standard_in) 1: syntax error
>> selftests: basic_test
>> ========================================
>> ok 1.. selftests: basic_test [PASS]
>> (standard_in) 1: syntax error
>> selftests: basic_percpu_ops_test
>> ========================================
>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>> (standard_in) 1: syntax error
>> selftests: param_test
>> ========================================
>> ok 1.. selftests: param_test [PASS]
> 
> Hi Mathieu,
> 
> Odd. I don't see the error. I am curious if this specific to
> env. Can you reproduce this with one of the existing tests,
> kcmp or breakpoints

Yes, it reproduces:

cd tools/testing/selftests/kcmp
make run_tests
gcc -I../../../../usr/include/    kcmp_test.c  -o /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
TAP version 13
(standard_in) 1: syntax error
selftests: kcmp_test
========================================
ok 1.. selftests: kcmp_test [PASS]

cd tools/testing/selftests/breakpoints
make run_tests
gcc     step_after_suspend_test.c  -o /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
gcc     breakpoint_test.c  -o /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
TAP version 13
(standard_in) 1: syntax error
selftests: step_after_suspend_test
========================================
not ok 1.. selftests:  step_after_suspend_test [FAIL]
(standard_in) 1: syntax error
selftests: breakpoint_test
========================================
ok 1.. selftests: breakpoint_test [PASS]

Thanks,

Mathieu


> 
>> 
>> With fix applied:
>> 
>> TAP version 13
>> selftests: basic_test
>> ========================================
>> ok 1..1 selftests: basic_test [PASS]
>> selftests: basic_percpu_ops_test
>> ========================================
>> ok 1..2 selftests: basic_percpu_ops_test [PASS]
>> selftests: param_test
>> ========================================
>> ok 1..3 selftests: param_test [PASS]
>> 
>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> Fixes: 1f87c7c15d7 ("selftests: lib.mk: change RUN_TESTS to print messages in
>> TAP13 format")
>> CC: Shuah Khan <shuahkh@osg.samsung.com>
>> CC: linux-kselftest@vger.kernel.org
>> ---
> 
> thanks,
> -- Shuah

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2017-11-01 22:22   ` Mathieu Desnoyers
@ 2017-11-01 22:24     ` Mathieu Desnoyers
  2017-11-01 22:28       ` Shuah Khan
  0 siblings, 1 reply; 20+ messages in thread
From: Mathieu Desnoyers @ 2017-11-01 22:24 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel, linux-kselftest, shuah

----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:

> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
> 
>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>> Within run_tests target, the whole script needs to be executed within
>>> the same shell and not as separate subshells, so the initial test_num
>>> variable set to 0 is still present when executing "test_num=`echo
>>> $$test_num+1 | bc`;".
>>> 
>>> Demonstration of the issue (make run_tests):
>>> 
>>> TAP version 13
>>> (standard_in) 1: syntax error
>>> selftests: basic_test
>>> ========================================
>>> ok 1.. selftests: basic_test [PASS]
>>> (standard_in) 1: syntax error
>>> selftests: basic_percpu_ops_test
>>> ========================================
>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>> (standard_in) 1: syntax error
>>> selftests: param_test
>>> ========================================
>>> ok 1.. selftests: param_test [PASS]
>> 
>> Hi Mathieu,
>> 
>> Odd. I don't see the error. I am curious if this specific to
>> env. Can you reproduce this with one of the existing tests,
>> kcmp or breakpoints
> 
> Yes, it reproduces:
> 
> cd tools/testing/selftests/kcmp
> make run_tests
> gcc -I../../../../usr/include/    kcmp_test.c  -o
> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
> TAP version 13
> (standard_in) 1: syntax error
> selftests: kcmp_test
> ========================================
> ok 1.. selftests: kcmp_test [PASS]
> 
> cd tools/testing/selftests/breakpoints
> make run_tests
> gcc     step_after_suspend_test.c  -o
> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
> gcc     breakpoint_test.c  -o
> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
> TAP version 13
> (standard_in) 1: syntax error
> selftests: step_after_suspend_test
> ========================================
> not ok 1.. selftests:  step_after_suspend_test [FAIL]
> (standard_in) 1: syntax error
> selftests: breakpoint_test
> ========================================
> ok 1.. selftests: breakpoint_test [PASS]
> 

The version of "make" on that machine is:

make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu

(if it helps reproducing)

Thanks,

Mathieu


> Thanks,
> 
> Mathieu
> 
> 
>> 
>>> 
>>> With fix applied:
>>> 
>>> TAP version 13
>>> selftests: basic_test
>>> ========================================
>>> ok 1..1 selftests: basic_test [PASS]
>>> selftests: basic_percpu_ops_test
>>> ========================================
>>> ok 1..2 selftests: basic_percpu_ops_test [PASS]
>>> selftests: param_test
>>> ========================================
>>> ok 1..3 selftests: param_test [PASS]
>>> 
>>> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>>> Fixes: 1f87c7c15d7 ("selftests: lib.mk: change RUN_TESTS to print messages in
>>> TAP13 format")
>>> CC: Shuah Khan <shuahkh@osg.samsung.com>
>>> CC: linux-kselftest@vger.kernel.org
>>> ---
>> 
>> thanks,
>> -- Shuah
> 
> --
> Mathieu Desnoyers
> EfficiOS Inc.
> http://www.efficios.com

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2017-11-01 22:24     ` Mathieu Desnoyers
@ 2017-11-01 22:28       ` Shuah Khan
  2018-04-27 20:17           ` mathieu.desnoyers
  0 siblings, 1 reply; 20+ messages in thread
From: Shuah Khan @ 2017-11-01 22:28 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: linux-kernel, linux-kselftest, shuah, Shuah Khan

On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers mathieu.desnoyers@efficios.com wrote:
> 
>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>
>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>> Within run_tests target, the whole script needs to be executed within
>>>> the same shell and not as separate subshells, so the initial test_num
>>>> variable set to 0 is still present when executing "test_num=`echo
>>>> $$test_num+1 | bc`;".
>>>>
>>>> Demonstration of the issue (make run_tests):
>>>>
>>>> TAP version 13
>>>> (standard_in) 1: syntax error
>>>> selftests: basic_test
>>>> ========================================
>>>> ok 1.. selftests: basic_test [PASS]
>>>> (standard_in) 1: syntax error
>>>> selftests: basic_percpu_ops_test
>>>> ========================================
>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>> (standard_in) 1: syntax error
>>>> selftests: param_test
>>>> ========================================
>>>> ok 1.. selftests: param_test [PASS]
>>>
>>> Hi Mathieu,
>>>
>>> Odd. I don't see the error. I am curious if this specific to
>>> env. Can you reproduce this with one of the existing tests,
>>> kcmp or breakpoints
>>
>> Yes, it reproduces:
>>
>> cd tools/testing/selftests/kcmp
>> make run_tests
>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>> TAP version 13
>> (standard_in) 1: syntax error
>> selftests: kcmp_test
>> ========================================
>> ok 1.. selftests: kcmp_test [PASS]
>>
>> cd tools/testing/selftests/breakpoints
>> make run_tests
>> gcc     step_after_suspend_test.c  -o
>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>> gcc     breakpoint_test.c  -o
>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>> TAP version 13
>> (standard_in) 1: syntax error
>> selftests: step_after_suspend_test
>> ========================================
>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>> (standard_in) 1: syntax error
>> selftests: breakpoint_test
>> ========================================
>> ok 1.. selftests: breakpoint_test [PASS]
>>
> 
> The version of "make" on that machine is:
> 
> make --version
> GNU Make 3.81
> Copyright (C) 2006  Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> 
> This program built for x86_64-pc-linux-gnu
> 
> (if it helps reproducing)
> 

Yup that's it. I have

GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I will test with your patch and see what happens in my env.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2017-11-01 22:28       ` Shuah Khan
  2018-04-27 20:17           ` mathieu.desnoyers
@ 2018-04-27 20:17           ` mathieu.desnoyers
  0 siblings, 0 replies; 20+ messages in thread
From: Mathieu Desnoyers @ 2018-04-27 20:17 UTC (permalink / raw)
  To: Shuah Khan; +Cc: linux-kernel, linux-kselftest, shuah

----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:

> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>> mathieu.desnoyers@efficios.com wrote:
>> 
>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>
>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>> Within run_tests target, the whole script needs to be executed within
>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>> $$test_num+1 | bc`;".
>>>>>
>>>>> Demonstration of the issue (make run_tests):
>>>>>
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: basic_test
>>>>> ========================================
>>>>> ok 1.. selftests: basic_test [PASS]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: basic_percpu_ops_test
>>>>> ========================================
>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: param_test
>>>>> ========================================
>>>>> ok 1.. selftests: param_test [PASS]
>>>>
>>>> Hi Mathieu,
>>>>
>>>> Odd. I don't see the error. I am curious if this specific to
>>>> env. Can you reproduce this with one of the existing tests,
>>>> kcmp or breakpoints
>>>
>>> Yes, it reproduces:
>>>
>>> cd tools/testing/selftests/kcmp
>>> make run_tests
>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>> TAP version 13
>>> (standard_in) 1: syntax error
>>> selftests: kcmp_test
>>> ========================================
>>> ok 1.. selftests: kcmp_test [PASS]
>>>
>>> cd tools/testing/selftests/breakpoints
>>> make run_tests
>>> gcc     step_after_suspend_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>> gcc     breakpoint_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>> TAP version 13
>>> (standard_in) 1: syntax error
>>> selftests: step_after_suspend_test
>>> ========================================
>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>> (standard_in) 1: syntax error
>>> selftests: breakpoint_test
>>> ========================================
>>> ok 1.. selftests: breakpoint_test [PASS]
>>>
>> 
>> The version of "make" on that machine is:
>> 
>> make --version
>> GNU Make 3.81
>> Copyright (C) 2006  Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.
>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>> PARTICULAR PURPOSE.
>> 
>> This program built for x86_64-pc-linux-gnu
>> 
>> (if it helps reproducing)
>> 
> 
> Yup that's it. I have
> 
> GNU Make 4.1
> Built for x86_64-pc-linux-gnu
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> I will test with your patch and see what happens in my env.

Hi,

I still see the problem with v4.17-rc2. Did you have time to
consider merging my fix ?

Thanks,

Mathieu


> 
> thanks,
> -- Shuah

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 20:17           ` mathieu.desnoyers
  0 siblings, 0 replies; 20+ messages in thread
From: mathieu.desnoyers @ 2018-04-27 20:17 UTC (permalink / raw)


----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh at osg.samsung.com wrote:

> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>> mathieu.desnoyers at efficios.com wrote:
>> 
>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>>
>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>> Within run_tests target, the whole script needs to be executed within
>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>> $$test_num+1 | bc`;".
>>>>>
>>>>> Demonstration of the issue (make run_tests):
>>>>>
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: basic_test
>>>>> ========================================
>>>>> ok 1.. selftests: basic_test [PASS]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: basic_percpu_ops_test
>>>>> ========================================
>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: param_test
>>>>> ========================================
>>>>> ok 1.. selftests: param_test [PASS]
>>>>
>>>> Hi Mathieu,
>>>>
>>>> Odd. I don't see the error. I am curious if this specific to
>>>> env. Can you reproduce this with one of the existing tests,
>>>> kcmp or breakpoints
>>>
>>> Yes, it reproduces:
>>>
>>> cd tools/testing/selftests/kcmp
>>> make run_tests
>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>> TAP version 13
>>> (standard_in) 1: syntax error
>>> selftests: kcmp_test
>>> ========================================
>>> ok 1.. selftests: kcmp_test [PASS]
>>>
>>> cd tools/testing/selftests/breakpoints
>>> make run_tests
>>> gcc     step_after_suspend_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>> gcc     breakpoint_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>> TAP version 13
>>> (standard_in) 1: syntax error
>>> selftests: step_after_suspend_test
>>> ========================================
>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>> (standard_in) 1: syntax error
>>> selftests: breakpoint_test
>>> ========================================
>>> ok 1.. selftests: breakpoint_test [PASS]
>>>
>> 
>> The version of "make" on that machine is:
>> 
>> make --version
>> GNU Make 3.81
>> Copyright (C) 2006  Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.
>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>> PARTICULAR PURPOSE.
>> 
>> This program built for x86_64-pc-linux-gnu
>> 
>> (if it helps reproducing)
>> 
> 
> Yup that's it. I have
> 
> GNU Make 4.1
> Built for x86_64-pc-linux-gnu
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> I will test with your patch and see what happens in my env.

Hi,

I still see the problem with v4.17-rc2. Did you have time to
consider merging my fix ?

Thanks,

Mathieu


> 
> thanks,
> -- Shuah

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 20:17           ` mathieu.desnoyers
  0 siblings, 0 replies; 20+ messages in thread
From: Mathieu Desnoyers @ 2018-04-27 20:17 UTC (permalink / raw)


----- On Nov 1, 2017,@6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:

> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>> mathieu.desnoyers@efficios.com wrote:
>> 
>>> ----- On Nov 1, 2017,@5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>
>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>> Within run_tests target, the whole script needs to be executed within
>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>> $$test_num+1 | bc`;".
>>>>>
>>>>> Demonstration of the issue (make run_tests):
>>>>>
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: basic_test
>>>>> ========================================
>>>>> ok 1.. selftests: basic_test [PASS]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: basic_percpu_ops_test
>>>>> ========================================
>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: param_test
>>>>> ========================================
>>>>> ok 1.. selftests: param_test [PASS]
>>>>
>>>> Hi Mathieu,
>>>>
>>>> Odd. I don't see the error. I am curious if this specific to
>>>> env. Can you reproduce this with one of the existing tests,
>>>> kcmp or breakpoints
>>>
>>> Yes, it reproduces:
>>>
>>> cd tools/testing/selftests/kcmp
>>> make run_tests
>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>> TAP version 13
>>> (standard_in) 1: syntax error
>>> selftests: kcmp_test
>>> ========================================
>>> ok 1.. selftests: kcmp_test [PASS]
>>>
>>> cd tools/testing/selftests/breakpoints
>>> make run_tests
>>> gcc     step_after_suspend_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>> gcc     breakpoint_test.c  -o
>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>> TAP version 13
>>> (standard_in) 1: syntax error
>>> selftests: step_after_suspend_test
>>> ========================================
>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>> (standard_in) 1: syntax error
>>> selftests: breakpoint_test
>>> ========================================
>>> ok 1.. selftests: breakpoint_test [PASS]
>>>
>> 
>> The version of "make" on that machine is:
>> 
>> make --version
>> GNU Make 3.81
>> Copyright (C) 2006  Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.
>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>> PARTICULAR PURPOSE.
>> 
>> This program built for x86_64-pc-linux-gnu
>> 
>> (if it helps reproducing)
>> 
> 
> Yup that's it. I have
> 
> GNU Make 4.1
> Built for x86_64-pc-linux-gnu
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> I will test with your patch and see what happens in my env.

Hi,

I still see the problem with v4.17-rc2. Did you have time to
consider merging my fix ?

Thanks,

Mathieu


> 
> thanks,
> -- Shuah

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2018-04-27 20:17           ` mathieu.desnoyers
  (?)
@ 2018-04-27 20:42             ` shuah
  -1 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2018-04-27 20:42 UTC (permalink / raw)
  To: Mathieu Desnoyers, Shuah Khan; +Cc: linux-kernel, linux-kselftest, Shuah Khan

On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
> 
>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>> mathieu.desnoyers@efficios.com wrote:
>>>
>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>
>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>> $$test_num+1 | bc`;".
>>>>>>
>>>>>> Demonstration of the issue (make run_tests):
>>>>>>
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: basic_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: basic_percpu_ops_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: param_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>
>>>>> Hi Mathieu,
>>>>>
>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>> env. Can you reproduce this with one of the existing tests,
>>>>> kcmp or breakpoints
>>>>
>>>> Yes, it reproduces:
>>>>
>>>> cd tools/testing/selftests/kcmp
>>>> make run_tests
>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>> TAP version 13
>>>> (standard_in) 1: syntax error
>>>> selftests: kcmp_test
>>>> ========================================
>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>
>>>> cd tools/testing/selftests/breakpoints
>>>> make run_tests
>>>> gcc     step_after_suspend_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>> gcc     breakpoint_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>> TAP version 13
>>>> (standard_in) 1: syntax error
>>>> selftests: step_after_suspend_test
>>>> ========================================
>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>> (standard_in) 1: syntax error
>>>> selftests: breakpoint_test
>>>> ========================================
>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>
>>>
>>> The version of "make" on that machine is:
>>>
>>> make --version
>>> GNU Make 3.81
>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions.
>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>> PARTICULAR PURPOSE.
>>>
>>> This program built for x86_64-pc-linux-gnu
>>>
>>> (if it helps reproducing)
>>>
>>
>> Yup that's it. I have
>>
>> GNU Make 4.1
>> Built for x86_64-pc-linux-gnu
>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>>
>> I will test with your patch and see what happens in my env.
> 
> Hi,
> 
> I still see the problem with v4.17-rc2. Did you have time to
> consider merging my fix ?
> 
> Thanks,
> 
> Mathieu

Sorry for the delay. It slipped through. I will queue this for the next rc. Thanks for
the ping. Hope it applies :)

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 20:42             ` shuah
  0 siblings, 0 replies; 20+ messages in thread
From: shuah @ 2018-04-27 20:42 UTC (permalink / raw)


On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
> 
>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>> mathieu.desnoyers at efficios.com wrote:
>>>
>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>>>
>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>> $$test_num+1 | bc`;".
>>>>>>
>>>>>> Demonstration of the issue (make run_tests):
>>>>>>
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: basic_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: basic_percpu_ops_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: param_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>
>>>>> Hi Mathieu,
>>>>>
>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>> env. Can you reproduce this with one of the existing tests,
>>>>> kcmp or breakpoints
>>>>
>>>> Yes, it reproduces:
>>>>
>>>> cd tools/testing/selftests/kcmp
>>>> make run_tests
>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>> TAP version 13
>>>> (standard_in) 1: syntax error
>>>> selftests: kcmp_test
>>>> ========================================
>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>
>>>> cd tools/testing/selftests/breakpoints
>>>> make run_tests
>>>> gcc     step_after_suspend_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>> gcc     breakpoint_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>> TAP version 13
>>>> (standard_in) 1: syntax error
>>>> selftests: step_after_suspend_test
>>>> ========================================
>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>> (standard_in) 1: syntax error
>>>> selftests: breakpoint_test
>>>> ========================================
>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>
>>>
>>> The version of "make" on that machine is:
>>>
>>> make --version
>>> GNU Make 3.81
>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions.
>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>> PARTICULAR PURPOSE.
>>>
>>> This program built for x86_64-pc-linux-gnu
>>>
>>> (if it helps reproducing)
>>>
>>
>> Yup that's it. I have
>>
>> GNU Make 4.1
>> Built for x86_64-pc-linux-gnu
>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>>
>> I will test with your patch and see what happens in my env.
> 
> Hi,
> 
> I still see the problem with v4.17-rc2. Did you have time to
> consider merging my fix ?
> 
> Thanks,
> 
> Mathieu

Sorry for the delay. It slipped through. I will queue this for the next rc. Thanks for
the ping. Hope it applies :)

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 20:42             ` shuah
  0 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2018-04-27 20:42 UTC (permalink / raw)


On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
> ----- On Nov 1, 2017,@6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
> 
>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>> mathieu.desnoyers@efficios.com wrote:
>>>
>>>> ----- On Nov 1, 2017,@5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>
>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>> $$test_num+1 | bc`;".
>>>>>>
>>>>>> Demonstration of the issue (make run_tests):
>>>>>>
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: basic_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: basic_percpu_ops_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: param_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>
>>>>> Hi Mathieu,
>>>>>
>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>> env. Can you reproduce this with one of the existing tests,
>>>>> kcmp or breakpoints
>>>>
>>>> Yes, it reproduces:
>>>>
>>>> cd tools/testing/selftests/kcmp
>>>> make run_tests
>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>> TAP version 13
>>>> (standard_in) 1: syntax error
>>>> selftests: kcmp_test
>>>> ========================================
>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>
>>>> cd tools/testing/selftests/breakpoints
>>>> make run_tests
>>>> gcc     step_after_suspend_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>> gcc     breakpoint_test.c  -o
>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>> TAP version 13
>>>> (standard_in) 1: syntax error
>>>> selftests: step_after_suspend_test
>>>> ========================================
>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>> (standard_in) 1: syntax error
>>>> selftests: breakpoint_test
>>>> ========================================
>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>
>>>
>>> The version of "make" on that machine is:
>>>
>>> make --version
>>> GNU Make 3.81
>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>> This is free software; see the source for copying conditions.
>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>> PARTICULAR PURPOSE.
>>>
>>> This program built for x86_64-pc-linux-gnu
>>>
>>> (if it helps reproducing)
>>>
>>
>> Yup that's it. I have
>>
>> GNU Make 4.1
>> Built for x86_64-pc-linux-gnu
>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>>
>> I will test with your patch and see what happens in my env.
> 
> Hi,
> 
> I still see the problem with v4.17-rc2. Did you have time to
> consider merging my fix ?
> 
> Thanks,
> 
> Mathieu

Sorry for the delay. It slipped through. I will queue this for the next rc. Thanks for
the ping. Hope it applies :)

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2018-04-27 20:42             ` shuah
  (?)
@ 2018-04-27 21:05               ` shuah
  -1 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2018-04-27 21:05 UTC (permalink / raw)
  To: Mathieu Desnoyers, Shuah Khan; +Cc: linux-kernel, linux-kselftest, Shuah Khan

On 04/27/2018 02:42 PM, Shuah Khan wrote:
> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>
>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>> mathieu.desnoyers@efficios.com wrote:
>>>>
>>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>>
>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>> $$test_num+1 | bc`;".
>>>>>>>
>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: basic_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: basic_percpu_ops_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: param_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>
>>>>>> Hi Mathieu,
>>>>>>
>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>> kcmp or breakpoints
>>>>>
>>>>> Yes, it reproduces:
>>>>>
>>>>> cd tools/testing/selftests/kcmp
>>>>> make run_tests
>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: kcmp_test
>>>>> ========================================
>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>
>>>>> cd tools/testing/selftests/breakpoints
>>>>> make run_tests
>>>>> gcc     step_after_suspend_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>> gcc     breakpoint_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: step_after_suspend_test
>>>>> ========================================
>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: breakpoint_test
>>>>> ========================================
>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>
>>>>
>>>> The version of "make" on that machine is:
>>>>
>>>> make --version
>>>> GNU Make 3.81
>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>> This is free software; see the source for copying conditions.
>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>> PARTICULAR PURPOSE.
>>>>
>>>> This program built for x86_64-pc-linux-gnu
>>>>
>>>> (if it helps reproducing)
>>>>
>>>
>>> Yup that's it. I have
>>>
>>> GNU Make 4.1
>>> Built for x86_64-pc-linux-gnu
>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.
>>>
>>> I will test with your patch and see what happens in my env.
>>
>> Hi,
>>
>> I still see the problem with v4.17-rc2. Did you have time to
>> consider merging my fix ?
>>
>> Thanks,
>>
>> Mathieu
> 
> Sorry for the delay. It slipped through. I will queue this for the next rc. Thanks for
> the ping. Hope it applies :)
> 
> thanks,
> -- Shuah
> 
> 

Now I remember why I didn't pull this in. With your patch, I see the same
failures you are seeing in my env. with 

GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I will have to figure out a different way to fix the problem.

thanks,
-- Shuah

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 21:05               ` shuah
  0 siblings, 0 replies; 20+ messages in thread
From: shuah @ 2018-04-27 21:05 UTC (permalink / raw)


On 04/27/2018 02:42 PM, Shuah Khan wrote:
> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>
>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>> mathieu.desnoyers at efficios.com wrote:
>>>>
>>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>>>>
>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>> $$test_num+1 | bc`;".
>>>>>>>
>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: basic_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: basic_percpu_ops_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: param_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>
>>>>>> Hi Mathieu,
>>>>>>
>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>> kcmp or breakpoints
>>>>>
>>>>> Yes, it reproduces:
>>>>>
>>>>> cd tools/testing/selftests/kcmp
>>>>> make run_tests
>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: kcmp_test
>>>>> ========================================
>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>
>>>>> cd tools/testing/selftests/breakpoints
>>>>> make run_tests
>>>>> gcc     step_after_suspend_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>> gcc     breakpoint_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: step_after_suspend_test
>>>>> ========================================
>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: breakpoint_test
>>>>> ========================================
>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>
>>>>
>>>> The version of "make" on that machine is:
>>>>
>>>> make --version
>>>> GNU Make 3.81
>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>> This is free software; see the source for copying conditions.
>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>> PARTICULAR PURPOSE.
>>>>
>>>> This program built for x86_64-pc-linux-gnu
>>>>
>>>> (if it helps reproducing)
>>>>
>>>
>>> Yup that's it. I have
>>>
>>> GNU Make 4.1
>>> Built for x86_64-pc-linux-gnu
>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.
>>>
>>> I will test with your patch and see what happens in my env.
>>
>> Hi,
>>
>> I still see the problem with v4.17-rc2. Did you have time to
>> consider merging my fix ?
>>
>> Thanks,
>>
>> Mathieu
> 
> Sorry for the delay. It slipped through. I will queue this for the next rc. Thanks for
> the ping. Hope it applies :)
> 
> thanks,
> -- Shuah
> 
> 

Now I remember why I didn't pull this in. With your patch, I see the same
failures you are seeing in my env. with 

GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I will have to figure out a different way to fix the problem.

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 21:05               ` shuah
  0 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2018-04-27 21:05 UTC (permalink / raw)


On 04/27/2018 02:42 PM, Shuah Khan wrote:
> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>> ----- On Nov 1, 2017,@6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>
>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>> mathieu.desnoyers@efficios.com wrote:
>>>>
>>>>> ----- On Nov 1, 2017,@5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>>
>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>> $$test_num+1 | bc`;".
>>>>>>>
>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: basic_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: basic_percpu_ops_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: param_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>
>>>>>> Hi Mathieu,
>>>>>>
>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>> kcmp or breakpoints
>>>>>
>>>>> Yes, it reproduces:
>>>>>
>>>>> cd tools/testing/selftests/kcmp
>>>>> make run_tests
>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: kcmp_test
>>>>> ========================================
>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>
>>>>> cd tools/testing/selftests/breakpoints
>>>>> make run_tests
>>>>> gcc     step_after_suspend_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>> gcc     breakpoint_test.c  -o
>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>> TAP version 13
>>>>> (standard_in) 1: syntax error
>>>>> selftests: step_after_suspend_test
>>>>> ========================================
>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>> (standard_in) 1: syntax error
>>>>> selftests: breakpoint_test
>>>>> ========================================
>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>
>>>>
>>>> The version of "make" on that machine is:
>>>>
>>>> make --version
>>>> GNU Make 3.81
>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>> This is free software; see the source for copying conditions.
>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>> PARTICULAR PURPOSE.
>>>>
>>>> This program built for x86_64-pc-linux-gnu
>>>>
>>>> (if it helps reproducing)
>>>>
>>>
>>> Yup that's it. I have
>>>
>>> GNU Make 4.1
>>> Built for x86_64-pc-linux-gnu
>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>> This is free software: you are free to change and redistribute it.
>>> There is NO WARRANTY, to the extent permitted by law.
>>>
>>> I will test with your patch and see what happens in my env.
>>
>> Hi,
>>
>> I still see the problem with v4.17-rc2. Did you have time to
>> consider merging my fix ?
>>
>> Thanks,
>>
>> Mathieu
> 
> Sorry for the delay. It slipped through. I will queue this for the next rc. Thanks for
> the ping. Hope it applies :)
> 
> thanks,
> -- Shuah
> 
> 

Now I remember why I didn't pull this in. With your patch, I see the same
failures you are seeing in my env. with 

GNU Make 4.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

I will have to figure out a different way to fix the problem.

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2018-04-27 21:05               ` shuah
  (?)
@ 2018-04-27 21:33                 ` mathieu.desnoyers
  -1 siblings, 0 replies; 20+ messages in thread
From: Mathieu Desnoyers @ 2018-04-27 21:33 UTC (permalink / raw)
  To: shuah; +Cc: Shuah Khan, linux-kernel, linux-kselftest

----- On Apr 27, 2018, at 5:05 PM, shuah shuah@kernel.org wrote:

> On 04/27/2018 02:42 PM, Shuah Khan wrote:
>> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>>> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>
>>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>>> mathieu.desnoyers@efficios.com wrote:
>>>>>
>>>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>>>
>>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>>> $$test_num+1 | bc`;".
>>>>>>>>
>>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>>
>>>>>>>> TAP version 13
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: basic_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: basic_percpu_ops_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: param_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>>
>>>>>>> Hi Mathieu,
>>>>>>>
>>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>>> kcmp or breakpoints
>>>>>>
>>>>>> Yes, it reproduces:
>>>>>>
>>>>>> cd tools/testing/selftests/kcmp
>>>>>> make run_tests
>>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: kcmp_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>>
>>>>>> cd tools/testing/selftests/breakpoints
>>>>>> make run_tests
>>>>>> gcc     step_after_suspend_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>>> gcc     breakpoint_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: step_after_suspend_test
>>>>>> ========================================
>>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: breakpoint_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>>
>>>>>
>>>>> The version of "make" on that machine is:
>>>>>
>>>>> make --version
>>>>> GNU Make 3.81
>>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>>> This is free software; see the source for copying conditions.
>>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>>> PARTICULAR PURPOSE.
>>>>>
>>>>> This program built for x86_64-pc-linux-gnu
>>>>>
>>>>> (if it helps reproducing)
>>>>>
>>>>
>>>> Yup that's it. I have
>>>>
>>>> GNU Make 4.1
>>>> Built for x86_64-pc-linux-gnu
>>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>>> This is free software: you are free to change and redistribute it.
>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>
>>>> I will test with your patch and see what happens in my env.
>>>
>>> Hi,
>>>
>>> I still see the problem with v4.17-rc2. Did you have time to
>>> consider merging my fix ?
>>>
>>> Thanks,
>>>
>>> Mathieu
>> 
>> Sorry for the delay. It slipped through. I will queue this for the next rc.
>> Thanks for
>> the ping. Hope it applies :)
>> 
>> thanks,
>> -- Shuah
>> 
>> 
> 
> Now I remember why I didn't pull this in. With your patch, I see the same
> failures you are seeing in my env. with
> 
> GNU Make 4.1
> Built for x86_64-pc-linux-gnu
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> I will have to figure out a different way to fix the problem.

It works fine here on my other machine that has GNU make 4.1 both with
and without the patch. The patch fixes the behavior on GNU make 3.81.

I noticed I had to manually apply the patch to 4.17-rc2. Here is the updated diff.
Please ensure that you both remove the appropriate "@" from beginning
of lines, and add "\" characters at end of lines if you integrate the patch
manually.

Thanks,

Mathieu

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 9fd57efae439..ceb6c7c48547 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -20,10 +20,10 @@ all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
 
 .ONESHELL:
 define RUN_TESTS
-       @export KSFT_TAP_LEVEL=`echo 1`;
-       @test_num=`echo 0`;
-       @echo "TAP version 13";
-       @for TEST in $(1); do                           \
+       @export KSFT_TAP_LEVEL=`echo 1`;                \
+       test_num=`echo 0`;                              \
+       echo "TAP version 13";                          \
+       for TEST in $(1); do                            \
                BASENAME_TEST=`basename $$TEST`;        \
                test_num=`echo $$test_num+1 | bc`;      \
                echo "selftests: $$BASENAME_TEST";      \

> 
> thanks,
> -- Shuah

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 21:33                 ` mathieu.desnoyers
  0 siblings, 0 replies; 20+ messages in thread
From: mathieu.desnoyers @ 2018-04-27 21:33 UTC (permalink / raw)


----- On Apr 27, 2018, at 5:05 PM, shuah shuah at kernel.org wrote:

> On 04/27/2018 02:42 PM, Shuah Khan wrote:
>> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>>> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>>
>>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>>> mathieu.desnoyers at efficios.com wrote:
>>>>>
>>>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>>>>>
>>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>>> $$test_num+1 | bc`;".
>>>>>>>>
>>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>>
>>>>>>>> TAP version 13
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: basic_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: basic_percpu_ops_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: param_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>>
>>>>>>> Hi Mathieu,
>>>>>>>
>>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>>> kcmp or breakpoints
>>>>>>
>>>>>> Yes, it reproduces:
>>>>>>
>>>>>> cd tools/testing/selftests/kcmp
>>>>>> make run_tests
>>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: kcmp_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>>
>>>>>> cd tools/testing/selftests/breakpoints
>>>>>> make run_tests
>>>>>> gcc     step_after_suspend_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>>> gcc     breakpoint_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: step_after_suspend_test
>>>>>> ========================================
>>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: breakpoint_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>>
>>>>>
>>>>> The version of "make" on that machine is:
>>>>>
>>>>> make --version
>>>>> GNU Make 3.81
>>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>>> This is free software; see the source for copying conditions.
>>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>>> PARTICULAR PURPOSE.
>>>>>
>>>>> This program built for x86_64-pc-linux-gnu
>>>>>
>>>>> (if it helps reproducing)
>>>>>
>>>>
>>>> Yup that's it. I have
>>>>
>>>> GNU Make 4.1
>>>> Built for x86_64-pc-linux-gnu
>>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>>> This is free software: you are free to change and redistribute it.
>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>
>>>> I will test with your patch and see what happens in my env.
>>>
>>> Hi,
>>>
>>> I still see the problem with v4.17-rc2. Did you have time to
>>> consider merging my fix ?
>>>
>>> Thanks,
>>>
>>> Mathieu
>> 
>> Sorry for the delay. It slipped through. I will queue this for the next rc.
>> Thanks for
>> the ping. Hope it applies :)
>> 
>> thanks,
>> -- Shuah
>> 
>> 
> 
> Now I remember why I didn't pull this in. With your patch, I see the same
> failures you are seeing in my env. with
> 
> GNU Make 4.1
> Built for x86_64-pc-linux-gnu
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> I will have to figure out a different way to fix the problem.

It works fine here on my other machine that has GNU make 4.1 both with
and without the patch. The patch fixes the behavior on GNU make 3.81.

I noticed I had to manually apply the patch to 4.17-rc2. Here is the updated diff.
Please ensure that you both remove the appropriate "@" from beginning
of lines, and add "\" characters at end of lines if you integrate the patch
manually.

Thanks,

Mathieu

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 9fd57efae439..ceb6c7c48547 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -20,10 +20,10 @@ all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
 
 .ONESHELL:
 define RUN_TESTS
-       @export KSFT_TAP_LEVEL=`echo 1`;
-       @test_num=`echo 0`;
-       @echo "TAP version 13";
-       @for TEST in $(1); do                           \
+       @export KSFT_TAP_LEVEL=`echo 1`;                \
+       test_num=`echo 0`;                              \
+       echo "TAP version 13";                          \
+       for TEST in $(1); do                            \
                BASENAME_TEST=`basename $$TEST`;        \
                test_num=`echo $$test_num+1 | bc`;      \
                echo "selftests: $$BASENAME_TEST";      \

> 
> thanks,
> -- Shuah

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 21:33                 ` mathieu.desnoyers
  0 siblings, 0 replies; 20+ messages in thread
From: Mathieu Desnoyers @ 2018-04-27 21:33 UTC (permalink / raw)


----- On Apr 27, 2018,@5:05 PM, shuah shuah@kernel.org wrote:

> On 04/27/2018 02:42 PM, Shuah Khan wrote:
>> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>>> ----- On Nov 1, 2017,@6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>
>>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>>> mathieu.desnoyers@efficios.com wrote:
>>>>>
>>>>>> ----- On Nov 1, 2017,@5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>>>
>>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>>> $$test_num+1 | bc`;".
>>>>>>>>
>>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>>
>>>>>>>> TAP version 13
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: basic_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: basic_percpu_ops_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>>> (standard_in) 1: syntax error
>>>>>>>> selftests: param_test
>>>>>>>> ========================================
>>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>>
>>>>>>> Hi Mathieu,
>>>>>>>
>>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>>> kcmp or breakpoints
>>>>>>
>>>>>> Yes, it reproduces:
>>>>>>
>>>>>> cd tools/testing/selftests/kcmp
>>>>>> make run_tests
>>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: kcmp_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>>
>>>>>> cd tools/testing/selftests/breakpoints
>>>>>> make run_tests
>>>>>> gcc     step_after_suspend_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>>> gcc     breakpoint_test.c  -o
>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>>> TAP version 13
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: step_after_suspend_test
>>>>>> ========================================
>>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>>> (standard_in) 1: syntax error
>>>>>> selftests: breakpoint_test
>>>>>> ========================================
>>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>>
>>>>>
>>>>> The version of "make" on that machine is:
>>>>>
>>>>> make --version
>>>>> GNU Make 3.81
>>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>>> This is free software; see the source for copying conditions.
>>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>>> PARTICULAR PURPOSE.
>>>>>
>>>>> This program built for x86_64-pc-linux-gnu
>>>>>
>>>>> (if it helps reproducing)
>>>>>
>>>>
>>>> Yup that's it. I have
>>>>
>>>> GNU Make 4.1
>>>> Built for x86_64-pc-linux-gnu
>>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>>> This is free software: you are free to change and redistribute it.
>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>
>>>> I will test with your patch and see what happens in my env.
>>>
>>> Hi,
>>>
>>> I still see the problem with v4.17-rc2. Did you have time to
>>> consider merging my fix ?
>>>
>>> Thanks,
>>>
>>> Mathieu
>> 
>> Sorry for the delay. It slipped through. I will queue this for the next rc.
>> Thanks for
>> the ping. Hope it applies :)
>> 
>> thanks,
>> -- Shuah
>> 
>> 
> 
> Now I remember why I didn't pull this in. With your patch, I see the same
> failures you are seeing in my env. with
> 
> GNU Make 4.1
> Built for x86_64-pc-linux-gnu
> Copyright (C) 1988-2014 Free Software Foundation, Inc.
> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
> This is free software: you are free to change and redistribute it.
> There is NO WARRANTY, to the extent permitted by law.
> 
> I will have to figure out a different way to fix the problem.

It works fine here on my other machine that has GNU make 4.1 both with
and without the patch. The patch fixes the behavior on GNU make 3.81.

I noticed I had to manually apply the patch to 4.17-rc2. Here is the updated diff.
Please ensure that you both remove the appropriate "@" from beginning
of lines, and add "\" characters at end of lines if you integrate the patch
manually.

Thanks,

Mathieu

diff --git a/tools/testing/selftests/lib.mk b/tools/testing/selftests/lib.mk
index 9fd57efae439..ceb6c7c48547 100644
--- a/tools/testing/selftests/lib.mk
+++ b/tools/testing/selftests/lib.mk
@@ -20,10 +20,10 @@ all: $(TEST_GEN_PROGS) $(TEST_GEN_PROGS_EXTENDED) $(TEST_GEN_FILES)
 
 .ONESHELL:
 define RUN_TESTS
-       @export KSFT_TAP_LEVEL=`echo 1`;
-       @test_num=`echo 0`;
-       @echo "TAP version 13";
-       @for TEST in $(1); do                           \
+       @export KSFT_TAP_LEVEL=`echo 1`;                \
+       test_num=`echo 0`;                              \
+       echo "TAP version 13";                          \
+       for TEST in $(1); do                            \
                BASENAME_TEST=`basename $$TEST`;        \
                test_num=`echo $$test_num+1 | bc`;      \
                echo "selftests: $$BASENAME_TEST";      \

> 
> thanks,
> -- Shuah

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
  2018-04-27 21:33                 ` mathieu.desnoyers
  (?)
@ 2018-04-27 21:41                   ` shuah
  -1 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2018-04-27 21:41 UTC (permalink / raw)
  To: Mathieu Desnoyers; +Cc: Shuah Khan, linux-kernel, linux-kselftest, Shuah Khan

On 04/27/2018 03:33 PM, Mathieu Desnoyers wrote:
> ----- On Apr 27, 2018, at 5:05 PM, shuah shuah@kernel.org wrote:
> 
>> On 04/27/2018 02:42 PM, Shuah Khan wrote:
>>> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>>>> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>
>>>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>>>> mathieu.desnoyers@efficios.com wrote:
>>>>>>
>>>>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>>>>
>>>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>>>> $$test_num+1 | bc`;".
>>>>>>>>>
>>>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>>>
>>>>>>>>> TAP version 13
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: basic_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: basic_percpu_ops_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: param_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>>>
>>>>>>>> Hi Mathieu,
>>>>>>>>
>>>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>>>> kcmp or breakpoints
>>>>>>>
>>>>>>> Yes, it reproduces:
>>>>>>>
>>>>>>> cd tools/testing/selftests/kcmp
>>>>>>> make run_tests
>>>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: kcmp_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>>>
>>>>>>> cd tools/testing/selftests/breakpoints
>>>>>>> make run_tests
>>>>>>> gcc     step_after_suspend_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>>>> gcc     breakpoint_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: step_after_suspend_test
>>>>>>> ========================================
>>>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: breakpoint_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>>>
>>>>>>
>>>>>> The version of "make" on that machine is:
>>>>>>
>>>>>> make --version
>>>>>> GNU Make 3.81
>>>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>>>> This is free software; see the source for copying conditions.
>>>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>>>> PARTICULAR PURPOSE.
>>>>>>
>>>>>> This program built for x86_64-pc-linux-gnu
>>>>>>
>>>>>> (if it helps reproducing)
>>>>>>
>>>>>
>>>>> Yup that's it. I have
>>>>>
>>>>> GNU Make 4.1
>>>>> Built for x86_64-pc-linux-gnu
>>>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>>>> This is free software: you are free to change and redistribute it.
>>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>>
>>>>> I will test with your patch and see what happens in my env.
>>>>
>>>> Hi,
>>>>
>>>> I still see the problem with v4.17-rc2. Did you have time to
>>>> consider merging my fix ?
>>>>
>>>> Thanks,
>>>>
>>>> Mathieu
>>>
>>> Sorry for the delay. It slipped through. I will queue this for the next rc.
>>> Thanks for
>>> the ping. Hope it applies :)
>>>
>>> thanks,
>>> -- Shuah
>>>
>>>
>>
>> Now I remember why I didn't pull this in. With your patch, I see the same
>> failures you are seeing in my env. with
>>
>> GNU Make 4.1
>> Built for x86_64-pc-linux-gnu
>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>>
>> I will have to figure out a different way to fix the problem.
> 
> It works fine here on my other machine that has GNU make 4.1 both with
> and without the patch. The patch fixes the behavior on GNU make 3.81.
> 
> I noticed I had to manually apply the patch to 4.17-rc2. Here is the updated diff.
> Please ensure that you both remove the appropriate "@" from beginning
> of lines, and add "\" characters at end of lines if you integrate the patch
> manually.
> 

Please rebase and resend the patch to avoid manual integration.

thanks,
-- Shuah


^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 21:41                   ` shuah
  0 siblings, 0 replies; 20+ messages in thread
From: shuah @ 2018-04-27 21:41 UTC (permalink / raw)


On 04/27/2018 03:33 PM, Mathieu Desnoyers wrote:
> ----- On Apr 27, 2018, at 5:05 PM, shuah shuah at kernel.org wrote:
> 
>> On 04/27/2018 02:42 PM, Shuah Khan wrote:
>>> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>>>> ----- On Nov 1, 2017, at 6:28 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>>>
>>>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>>>> mathieu.desnoyers at efficios.com wrote:
>>>>>>
>>>>>>> ----- On Nov 1, 2017, at 5:33 PM, Shuah Khan shuahkh at osg.samsung.com wrote:
>>>>>>>
>>>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>>>> $$test_num+1 | bc`;".
>>>>>>>>>
>>>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>>>
>>>>>>>>> TAP version 13
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: basic_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: basic_percpu_ops_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: param_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>>>
>>>>>>>> Hi Mathieu,
>>>>>>>>
>>>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>>>> kcmp or breakpoints
>>>>>>>
>>>>>>> Yes, it reproduces:
>>>>>>>
>>>>>>> cd tools/testing/selftests/kcmp
>>>>>>> make run_tests
>>>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: kcmp_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>>>
>>>>>>> cd tools/testing/selftests/breakpoints
>>>>>>> make run_tests
>>>>>>> gcc     step_after_suspend_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>>>> gcc     breakpoint_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: step_after_suspend_test
>>>>>>> ========================================
>>>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: breakpoint_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>>>
>>>>>>
>>>>>> The version of "make" on that machine is:
>>>>>>
>>>>>> make --version
>>>>>> GNU Make 3.81
>>>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>>>> This is free software; see the source for copying conditions.
>>>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>>>> PARTICULAR PURPOSE.
>>>>>>
>>>>>> This program built for x86_64-pc-linux-gnu
>>>>>>
>>>>>> (if it helps reproducing)
>>>>>>
>>>>>
>>>>> Yup that's it. I have
>>>>>
>>>>> GNU Make 4.1
>>>>> Built for x86_64-pc-linux-gnu
>>>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>>>> This is free software: you are free to change and redistribute it.
>>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>>
>>>>> I will test with your patch and see what happens in my env.
>>>>
>>>> Hi,
>>>>
>>>> I still see the problem with v4.17-rc2. Did you have time to
>>>> consider merging my fix ?
>>>>
>>>> Thanks,
>>>>
>>>> Mathieu
>>>
>>> Sorry for the delay. It slipped through. I will queue this for the next rc.
>>> Thanks for
>>> the ping. Hope it applies :)
>>>
>>> thanks,
>>> -- Shuah
>>>
>>>
>>
>> Now I remember why I didn't pull this in. With your patch, I see the same
>> failures you are seeing in my env. with
>>
>> GNU Make 4.1
>> Built for x86_64-pc-linux-gnu
>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>>
>> I will have to figure out a different way to fix the problem.
> 
> It works fine here on my other machine that has GNU make 4.1 both with
> and without the patch. The patch fixes the behavior on GNU make 3.81.
> 
> I noticed I had to manually apply the patch to 4.17-rc2. Here is the updated diff.
> Please ensure that you both remove the appropriate "@" from beginning
> of lines, and add "\" characters at end of lines if you integrate the patch
> manually.
> 

Please rebase and resend the patch to avoid manual integration.

thanks,
-- Shuah

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script
@ 2018-04-27 21:41                   ` shuah
  0 siblings, 0 replies; 20+ messages in thread
From: Shuah Khan @ 2018-04-27 21:41 UTC (permalink / raw)


On 04/27/2018 03:33 PM, Mathieu Desnoyers wrote:
> ----- On Apr 27, 2018,@5:05 PM, shuah shuah@kernel.org wrote:
> 
>> On 04/27/2018 02:42 PM, Shuah Khan wrote:
>>> On 04/27/2018 02:17 PM, Mathieu Desnoyers wrote:
>>>> ----- On Nov 1, 2017,@6:28 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>
>>>>> On 11/01/2017 04:24 PM, Mathieu Desnoyers wrote:
>>>>>> ----- On Nov 1, 2017, at 6:22 PM, Mathieu Desnoyers
>>>>>> mathieu.desnoyers@efficios.com wrote:
>>>>>>
>>>>>>> ----- On Nov 1, 2017,@5:33 PM, Shuah Khan shuahkh@osg.samsung.com wrote:
>>>>>>>
>>>>>>>> On 10/28/2017 07:46 AM, Mathieu Desnoyers wrote:
>>>>>>>>> Within run_tests target, the whole script needs to be executed within
>>>>>>>>> the same shell and not as separate subshells, so the initial test_num
>>>>>>>>> variable set to 0 is still present when executing "test_num=`echo
>>>>>>>>> $$test_num+1 | bc`;".
>>>>>>>>>
>>>>>>>>> Demonstration of the issue (make run_tests):
>>>>>>>>>
>>>>>>>>> TAP version 13
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: basic_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: basic_test [PASS]
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: basic_percpu_ops_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: basic_percpu_ops_test [PASS]
>>>>>>>>> (standard_in) 1: syntax error
>>>>>>>>> selftests: param_test
>>>>>>>>> ========================================
>>>>>>>>> ok 1.. selftests: param_test [PASS]
>>>>>>>>
>>>>>>>> Hi Mathieu,
>>>>>>>>
>>>>>>>> Odd. I don't see the error. I am curious if this specific to
>>>>>>>> env. Can you reproduce this with one of the existing tests,
>>>>>>>> kcmp or breakpoints
>>>>>>>
>>>>>>> Yes, it reproduces:
>>>>>>>
>>>>>>> cd tools/testing/selftests/kcmp
>>>>>>> make run_tests
>>>>>>> gcc -I../../../../usr/include/    kcmp_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/kcmp/kcmp_test
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: kcmp_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: kcmp_test [PASS]
>>>>>>>
>>>>>>> cd tools/testing/selftests/breakpoints
>>>>>>> make run_tests
>>>>>>> gcc     step_after_suspend_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/step_after_suspend_test
>>>>>>> gcc     breakpoint_test.c  -o
>>>>>>> /home/efficios/git/linux-rseq/tools/testing/selftests/breakpoints/breakpoint_test
>>>>>>> TAP version 13
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: step_after_suspend_test
>>>>>>> ========================================
>>>>>>> not ok 1.. selftests:  step_after_suspend_test [FAIL]
>>>>>>> (standard_in) 1: syntax error
>>>>>>> selftests: breakpoint_test
>>>>>>> ========================================
>>>>>>> ok 1.. selftests: breakpoint_test [PASS]
>>>>>>>
>>>>>>
>>>>>> The version of "make" on that machine is:
>>>>>>
>>>>>> make --version
>>>>>> GNU Make 3.81
>>>>>> Copyright (C) 2006  Free Software Foundation, Inc.
>>>>>> This is free software; see the source for copying conditions.
>>>>>> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
>>>>>> PARTICULAR PURPOSE.
>>>>>>
>>>>>> This program built for x86_64-pc-linux-gnu
>>>>>>
>>>>>> (if it helps reproducing)
>>>>>>
>>>>>
>>>>> Yup that's it. I have
>>>>>
>>>>> GNU Make 4.1
>>>>> Built for x86_64-pc-linux-gnu
>>>>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>>>>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>>>>> This is free software: you are free to change and redistribute it.
>>>>> There is NO WARRANTY, to the extent permitted by law.
>>>>>
>>>>> I will test with your patch and see what happens in my env.
>>>>
>>>> Hi,
>>>>
>>>> I still see the problem with v4.17-rc2. Did you have time to
>>>> consider merging my fix ?
>>>>
>>>> Thanks,
>>>>
>>>> Mathieu
>>>
>>> Sorry for the delay. It slipped through. I will queue this for the next rc.
>>> Thanks for
>>> the ping. Hope it applies :)
>>>
>>> thanks,
>>> -- Shuah
>>>
>>>
>>
>> Now I remember why I didn't pull this in. With your patch, I see the same
>> failures you are seeing in my env. with
>>
>> GNU Make 4.1
>> Built for x86_64-pc-linux-gnu
>> Copyright (C) 1988-2014 Free Software Foundation, Inc.
>> License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
>> This is free software: you are free to change and redistribute it.
>> There is NO WARRANTY, to the extent permitted by law.
>>
>> I will have to figure out a different way to fix the problem.
> 
> It works fine here on my other machine that has GNU make 4.1 both with
> and without the patch. The patch fixes the behavior on GNU make 3.81.
> 
> I noticed I had to manually apply the patch to 4.17-rc2. Here is the updated diff.
> Please ensure that you both remove the appropriate "@" from beginning
> of lines, and add "\" characters at end of lines if you integrate the patch
> manually.
> 

Please rebase and resend the patch to avoid manual integration.

thanks,
-- Shuah

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

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2018-04-27 21:42 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-28 13:46 [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script Mathieu Desnoyers
2017-11-01 21:33 ` Shuah Khan
2017-11-01 22:22   ` Mathieu Desnoyers
2017-11-01 22:24     ` Mathieu Desnoyers
2017-11-01 22:28       ` Shuah Khan
2018-04-27 20:17         ` Mathieu Desnoyers
2018-04-27 20:17           ` Mathieu Desnoyers
2018-04-27 20:17           ` mathieu.desnoyers
2018-04-27 20:42           ` Shuah Khan
2018-04-27 20:42             ` Shuah Khan
2018-04-27 20:42             ` shuah
2018-04-27 21:05             ` Shuah Khan
2018-04-27 21:05               ` Shuah Khan
2018-04-27 21:05               ` shuah
2018-04-27 21:33               ` Mathieu Desnoyers
2018-04-27 21:33                 ` Mathieu Desnoyers
2018-04-27 21:33                 ` mathieu.desnoyers
2018-04-27 21:41                 ` Shuah Khan
2018-04-27 21:41                   ` Shuah Khan
2018-04-27 21:41                   ` shuah

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.