From patchwork Tue Mar 21 07:15:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Po-Hsu Lin X-Patchwork-Id: 1759317 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=RSObbXuO; dkim-atps=neutral Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4PgjZW59SZz247d for ; Tue, 21 Mar 2023 18:16:18 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1peWE2-0000I1-I1; Tue, 21 Mar 2023 07:16:06 +0000 Received: from smtp-relay-canonical-0.internal ([10.131.114.83] helo=smtp-relay-canonical-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1peWDz-0000HS-9R for kernel-team@lists.ubuntu.com; Tue, 21 Mar 2023 07:16:03 +0000 Received: from localhost.localdomain (1.general.phlin.uk.vpn [10.172.194.38]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-canonical-0.canonical.com (Postfix) with ESMTPSA id 50FE53F25F for ; Tue, 21 Mar 2023 07:16:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1679382962; bh=FfvCyFThbF/gnD3ZeFlDiql/XH6B7UCGLIB9+ANX/OE=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=RSObbXuOL0guKSbzTntGUcGx3q94Ho/IBhXiAOp4hu5ru+A+/JAcghjn9R3mQz/HN 84X9fOYCZv0kQvm7nwXs7QM+N7Mr7zz2h5S+vMShPEKrb4kBS4tGe5ynJFPk2sd5pl zfpnP23uM7XJslyufhJNrgQMa4gcva6DqIsYTzgesVCS1dgKwJnvLz59u9FAMB2xBv rAQtUus7k5Ou+YMaNLt5Bh4Ikb6BUNN6oHJRxb5JQQ6Wh4Ue6LEPT0P3XYSNOuG3ic 8T/wLl/eGix+H6+HNtMXY75GPmwC+CnPHS7IhF4nn5d2DJp0pF/FiztneNC89JAo4G vukGCL1Lq2c5Q== From: Po-Hsu Lin To: kernel-team@lists.ubuntu.com Subject: [B][SRU][PATCH 1/1] selftests/ftrace: Fix bash specific "==" operator Date: Tue, 21 Mar 2023 15:15:09 +0800 Message-Id: <20230321071509.79196-2-po-hsu.lin@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230321071509.79196-1-po-hsu.lin@canonical.com> References: <20230321071509.79196-1-po-hsu.lin@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: "Masami Hiramatsu (Google)" BugLink: https://bugs.launchpad.net/bugs/2006453 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) Signed-off-by: Shuah Khan (cherry picked from commit 1e6b485c922fbedf41d5a9f4e6449c5aeb923a32) Signed-off-by: Po-Hsu Lin --- tools/testing/selftests/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 79d614f..d620223a 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 @@ -49,7 +49,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