From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934593AbdKAVd0 (ORCPT ); Wed, 1 Nov 2017 17:33:26 -0400 Received: from osg.samsung.com ([64.30.133.232]:49701 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933276AbdKAVdY (ORCPT ); Wed, 1 Nov 2017 17:33:24 -0400 Subject: Re: [PATCH 1/1] selftests: Fix lib.mk run_tests target shell script To: Mathieu Desnoyers Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, Shuah Khan , Shuah Khan References: <20171028134639.16811-1-mathieu.desnoyers@efficios.com> From: Shuah Khan Message-ID: <44e3d6b0-6e0d-4482-fa7e-d8dac8619d4e@osg.samsung.com> Date: Wed, 1 Nov 2017 15:33:11 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171028134639.16811-1-mathieu.desnoyers@efficios.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 > 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