From patchwork Sat Jan 21 23:32:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu (Google)" X-Patchwork-Id: 46898 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp919368wrn; Sat, 21 Jan 2023 15:35:04 -0800 (PST) X-Google-Smtp-Source: AMrXdXsgXXktEe5Kbomz/LEWQsbcmbtP/iwK7xXiszSO8lvfgpwZzrHX59xZO0oLYjjLLbxFj0oJ X-Received: by 2002:a17:907:10d4:b0:7ec:27d7:1838 with SMTP id rv20-20020a17090710d400b007ec27d71838mr21663849ejb.22.1674344104317; Sat, 21 Jan 2023 15:35:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674344104; cv=none; d=google.com; s=arc-20160816; b=yfvIST2ekhGzz0Ofh0GODOSIQSiDvA9RQdzMlwZlmywhkcYp0dcaf0B9GK4hZD2BxY vr9F3L2jo2t/njz2RqN9vF+rViKgGYYFQbuctvMwcx8rReNcDWuKE9q5DOz/g+Rcc0Fh pJZXee6zCi8Xgho5MMzg50CNtPKSgciyR+Fp0EEo710DEuCUhMD4GTptfYlbj1vUaUI0 POi1QFDHsh59+Zz392KKJrLwEN/qfifXyZ5rI/F9rFUYmS6ECqhPyL5Y6YsYCk2fF43K G4dULxgoKumQQUs2viFnBU6gscPv97XhAasLbW/AusZ/gGvM9NhnL4MRFuBjI/Bzxwps Gn8A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=zHByu+PeFRiuRqv0Iqerk5N6Yn10z7hg7JPuwzIKL3U=; b=oYydvnzA0R5b2FbK1nfqgFPJP1bvZPFqgY5TQ0hTbDE5mjuAGU/6JOGaozwi32WiuZ 9Yl/gVwPdnCh9Y4+Vy3JgRm2GX3RFi5q2Iurez8AIvdVa18MgwgTd25aiNBedZGeWE4n 5hiM0zTIgiNWSdtt7wZKxSGH7VghRVVNtEEb0HHLOQPYxMe/S4ePHYbSoU4BzrMApnAe huEHkRdMsrurydYbFJJx+FGmCyV41NQ5hWXwBdmZvr0HY0lniMk2oNNvp1wA2KqWzCpN 1tE3NxlQ66wGPK0TrrM8cLeo9yE3S9ooOT89/Rh/4p8FvFMR22F0UYbANX24ulqCk+zp PGyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucCJ5P6k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ch29-20020a0564021bdd00b00497326c9e1csi1941582edb.594.2023.01.21.15.34.40; Sat, 21 Jan 2023 15:35:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ucCJ5P6k; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229622AbjAUXc5 (ORCPT + 99 others); Sat, 21 Jan 2023 18:32:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58860 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbjAUXc4 (ORCPT ); Sat, 21 Jan 2023 18:32:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8526910250; Sat, 21 Jan 2023 15:32:55 -0800 (PST) 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 0F44060918; Sat, 21 Jan 2023 23:32:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2EE0BC433D2; Sat, 21 Jan 2023 23:32:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1674343974; bh=xmn62+MR0FZVY202glZIVA2fWAdWaDi9PFeFOODhzlo=; h=From:To:Cc:Subject:Date:From; b=ucCJ5P6k2XO8FZmWC7j/0m3scJ+JP8M3Lt7rAMloSoivtrbhwI5Uk0TXgnZazsYQ7 XCS1ozVJ2jOAIU/IWRJYYRfnf2HFoavTPDm31X9bX6zoqghYqPcq7acRRlYXiFqyM7 dZIt7j+WFjX7TMRO9ZXMXgtmP6yWXY7zh0heuCAq+UM4hhJWVAeCJpYG5EKoqeuon7 ftjBLJ7LzmwheSgDjrtP8c6bv93PUsjMdqyMEs4yEaF7jbSHzYrFgNP5xggFnkhq6y eVdjJC5keIt1s5R1jNeTAFcSKDYeXqCMo0SCDzcxSqwU7VFGzCohPnngBqR3sTzh41 pJt27ge1chd8Q== From: "Masami Hiramatsu (Google)" To: Shuah Khan , Steven Rostedt Cc: Yipeng Zou , Masami Hiramatsu , linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH] selftests/ftrace: Fix bash specific "==" operator Date: Sun, 22 Jan 2023 08:32:50 +0900 Message-Id: <167434397083.3069767.14730152459198287532.stgit@devnote3> X-Mailer: git-send-email 2.39.0.246.g2a6d74b583-goog User-Agent: StGit/0.19 MIME-Version: 1.0 X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755677043241914806?= X-GMAIL-MSGID: =?utf-8?q?1755677043241914806?= From: Masami Hiramatsu (Google) Since commit a1d6cd88c897 ("selftests/ftrace: event_triggers: wait longer for test_event_enable") introduced bash specific "==" comparation operator, that test will fail when we run it on a posix-shell. `checkbashisms` warned it as below. possible bashism in ftrace/func_event_triggers.tc line 45 (should be 'b = a'): if [ "$e" == $val ]; then This replaces it with "=". Fixes: a1d6cd88c897 ("selftests/ftrace: event_triggers: wait longer for test_event_enable") Signed-off-by: Masami Hiramatsu (Google) Reviewed-by: Steven Rostedt (Google) --- .../ftrace/test.d/ftrace/func_event_triggers.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc index 3eea2abf68f9..2ad7d4b501cc 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_event_triggers.tc @@ -42,7 +42,7 @@ test_event_enabled() { while [ $check_times -ne 0 ]; do e=`cat $EVENT_ENABLE` - if [ "$e" == $val ]; then + if [ "$e" = $val ]; then return 0 fi sleep $SLEEP_TIME