From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933748AbdKAWYf (ORCPT ); Wed, 1 Nov 2017 18:24:35 -0400 Received: from mail.efficios.com ([167.114.142.141]:34498 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933472AbdKAWYc (ORCPT ); Wed, 1 Nov 2017 18:24:32 -0400 Date: Wed, 1 Nov 2017 22:24:33 +0000 (UTC) From: Mathieu Desnoyers To: Shuah Khan Cc: linux-kernel , linux-kselftest , shuah Message-ID: <1717349402.1702.1509575073204.JavaMail.zimbra@efficios.com> In-Reply-To: <1490563551.1701.1509574972486.JavaMail.zimbra@efficios.com> References: <20171028134639.16811-1-mathieu.desnoyers@efficios.com> <44e3d6b0-6e0d-4482-fa7e-d8dac8619d4e@osg.samsung.com> <1490563551.1701.1509574972486.JavaMail.zimbra@efficios.com> Subject: Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [167.114.142.141] X-Mailer: Zimbra 8.7.11_GA_1854 (ZimbraWebClient - FF52 (Linux)/8.7.11_GA_1854) Thread-Topic: selftests: Fix lib.mk run_tests target shell script Thread-Index: VnWuzXwp8c5MiIg18G+bsJgoyGJoxigkh/RB Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ----- 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 >>> Fixes: 1f87c7c15d7 ("selftests: lib.mk: change RUN_TESTS to print messages in >>> TAP13 format") >>> CC: Shuah Khan >>> CC: linux-kselftest@vger.kernel.org >>> --- >> >> thanks, >> -- Shuah > > -- > Mathieu Desnoyers > EfficiOS Inc. > http://www.efficios.com -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com