From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 37445EB64D7 for ; Tue, 13 Jun 2023 20:07:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239870AbjFMUG4 (ORCPT ); Tue, 13 Jun 2023 16:06:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239795AbjFMUGy (ORCPT ); Tue, 13 Jun 2023 16:06:54 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8CFC91732 for ; Tue, 13 Jun 2023 13:06:53 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1559A6353C for ; Tue, 13 Jun 2023 20:06:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B11BC433F0; Tue, 13 Jun 2023 20:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1686686812; bh=TDAL0PNjfKzexRJes9YMCwJd4LRCQtxHOJlAvxL4ucQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MPAq+9ZTxS2wXilNMI2iVJVGpBRMz6rfjPWVEKiRyej/IaTiGK/UGRJLMdTg7vDEb lIwoSnsAW3bM2p2rsiJ65/vl6tgrDfJb2qjvz9FifYbUIqWU2QN2QDVtxUYppK3JSg yKVQbnrg8FcGBhkaXKi+Y0bK+dbaQgM6Gv2MiYTiXgoaGmjeEobTj0stPEVwF1OeUA uOu1K5o8g5x/FvFolLjkeR+m9rXf16/HCdbYEHMntkZz99hjKV4KkDkK0Otmz+kIX/ g90yiWczFZHOCBJ7+vWJAMvIArIWIN9O0rnQq2HD62F/Bv+tdXPqZfKAS98q0QmZuY RCPmLgv+ywq2Q== Received: by quaco.ghostprotocols.net (Postfix, from userid 1000) id A25B240692; Tue, 13 Jun 2023 17:06:49 -0300 (-03) Date: Tue, 13 Jun 2023 17:06:49 -0300 From: Arnaldo Carvalho de Melo To: Athira Rajeev , Petar Gligoric , Hagen Paul Pfeifer Cc: jolsa@kernel.org, irogers@google.com, namhyung@kernel.org, ravi.bangoria@amd.com, john.g.garry@oracle.com, linux-perf-users@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, maddy@linux.ibm.com, kjain@linux.ibm.com, disgoel@linux.vnet.ibm.com, Aditya Gupta Subject: Re: [PATCH 15/17] perf tests task_analyzer: fix bad substitution ${$1} Message-ID: References: <20230613164145.50488-1-atrajeev@linux.vnet.ibm.com> <20230613164145.50488-16-atrajeev@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230613164145.50488-16-atrajeev@linux.vnet.ibm.com> X-Url: http://acmel.wordpress.com Precedence: bulk List-ID: X-Mailing-List: linux-perf-users@vger.kernel.org Em Tue, Jun 13, 2023 at 10:11:43PM +0530, Athira Rajeev escreveu: > From: Aditya Gupta > > ${$1} gives bad substitution error on sh, bash, and zsh. This seems like > a typo, and this patch modifies it to $1, since that is what it's usage > looks like from wherever `check_exec_0` is called. Nicely spotted! Please add the people that last touched the problem to the cc list, specially when it fixes a bug. Thanks for adding a Fixes tag, that helps the stable@kernel.org guys to get this propagated to supported kernel releases. I've added the test author to the CC list in this message. thanks! - Arnaldo > This issue due to ${$1} caused all function calls to give error in > `find_str_or_fail` line, and so no test runs completely. But > 'perf test "perf script task-analyzer tests"' wrongly reports > that tests passed with the status OK, which is wrong considering > the tests didn't even run completely > > Fixes: e8478b84d6ba ("perf test: add new task-analyzer tests") > Signed-off-by: Athira Rajeev > Signed-off-by: Kajol Jain > Signed-off-by: Aditya Gupta > --- > tools/perf/tests/shell/test_task_analyzer.sh | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/perf/tests/shell/test_task_analyzer.sh b/tools/perf/tests/shell/test_task_analyzer.sh > index 4264b54b654b..84ab7e7f57d5 100755 > --- a/tools/perf/tests/shell/test_task_analyzer.sh > +++ b/tools/perf/tests/shell/test_task_analyzer.sh > @@ -31,7 +31,7 @@ report() { > > check_exec_0() { > if [ $? != 0 ]; then > - report 1 "invokation of ${$1} command failed" > + report 1 "invocation of $1 command failed" > fi > } > > -- > 2.39.1 > -- - Arnaldo