Received: by 2002:a05:6358:a55:b0:ec:fcf4:3ecf with SMTP id 21csp4730637rwb; Tue, 17 Jan 2023 04:57:29 -0800 (PST) X-Google-Smtp-Source: AMrXdXvTaQw9julis3ZsvkhdlUZXfF7DEoIbLE+lNp3jWPdDT3QzukWeokVzTF2t6PntyRPt+tds X-Received: by 2002:aa7:d691:0:b0:499:ed25:c9f9 with SMTP id d17-20020aa7d691000000b00499ed25c9f9mr3001861edr.27.1673960249108; Tue, 17 Jan 2023 04:57:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673960249; cv=none; d=google.com; s=arc-20160816; b=tBFMTRg1rvIv9y89fTa4z7mtehn1zQXYfyBSTVIYokxioSvuTUpV0LaZ2hJxylAJXF 3dkyCeJcF51lmFogy0RsDfb0YYRKZYvaYgCcq/v6mFEEwfsjtiJ1cq5EZhHGEYuP5Gff 12BbWC+xrbzH1vaFPcomcXyl8ByU6HfcfWTUvC0xRn0IYpVCoYWU9X9AAO+61dBy4MV9 9FrrwjSKvRnSegde7xiYGHxpboad3Grg3dKoPMlgePx8Kiqn9v4RlpmRIBMWsN6e+QI7 BEaCZucnF0GiEaKUph+fNPxnIEoT5neYSDWDzG8QL52sYuV2CpWeoAfRmwvDn8BezRoy mIKA== 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 :message-id:date:subject:cc:to:from; bh=8HBf5pCiAWzQFrR/kgxR8PuwIgAEHbVooqueCi6VvGE=; b=J/iqGxzmKFm7FiyqkgreCoD+BqqPKXX1JCKpBrizLmj1g26zeD42MwiXPMIefJvNpe Y5FBS3S7w+/0VEh2nUfGhKbInF2rgqqUpayND74AGXbE0s9rjf0FhbTphuxM6x3yARNH 646BktFVClU4qAzZt8gIIXaETHVlReUgSrXUJoEpW+WIjrcDRNMSZejrc1iUypcmUOrp yd2+J/OHgeO8FL1NUYXg2oJoNbwEwqLflK+eHpT77K2nX4VX+9X+kO8VZxvHtgoapcZd 1TVmNDLGvCv/d7IlMxAXlgLBBnkCpyfHVq4IXld3xnFXLnVomAxZFf05pUduv5kEm8bo DXtQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w4-20020a05640234c400b0049e165b5feasi8265227edc.16.2023.01.17.04.57.17; Tue, 17 Jan 2023 04:57:29 -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; 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=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236204AbjAQMpo (ORCPT + 48 others); Tue, 17 Jan 2023 07:45:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236398AbjAQMpj (ORCPT ); Tue, 17 Jan 2023 07:45:39 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 376B418B26; Tue, 17 Jan 2023 04:45:36 -0800 (PST) Received: from dggpeml100012.china.huawei.com (unknown [172.30.72.56]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Nx7qt4q96zJrK0; Tue, 17 Jan 2023 20:44:10 +0800 (CST) Received: from localhost.localdomain (10.67.175.61) by dggpeml100012.china.huawei.com (7.185.36.121) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.34; Tue, 17 Jan 2023 20:45:33 +0800 From: Zheng Yejian To: , , CC: , , , , , , Subject: [PATCH 5.10] Revert "selftests/ftrace: Update synthetic event syntax errors" Date: Tue, 17 Jan 2023 20:47:09 +0800 Message-ID: <20230117124709.2341012-1-zhengyejian1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.67.175.61] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpeml100012.china.huawei.com (7.185.36.121) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, 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 This reverts commit 31c2e369b5335d70e913afee3ae11e54d61afef2. The reverted commit belongs to patchset which updated synthetic event command parsing and testcase 'trigger-synthetic_event_syntax_errors.tc' Link: https://lore.kernel.org/all/20210211020950.102294806@goodmis.org/ However this testcase update was backported alone without feature update, which makes the testcase cannot pass on stable branch. Revert this commit to make the testcase correct. Fixes: 31c2e369b533 ("selftests/ftrace: Update synthetic event syntax errors") Reported-by: Chen Zhongjin Signed-off-by: Zheng Yejian --- .../trigger-synthetic_event_syntax_errors.tc | 35 +++++-------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc index 955e3ceea44b..ada594fe16cb 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic_event_syntax_errors.tc @@ -1,38 +1,19 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test synthetic_events syntax parser errors -# requires: synthetic_events error_log "char name[]' >> synthetic_events":README +# requires: synthetic_events error_log check_error() { # command-with-error-pos-by-^ ftrace_errlog_check 'synthetic_events' "$1" 'synthetic_events' } -check_dyn_error() { # command-with-error-pos-by-^ - ftrace_errlog_check 'synthetic_events' "$1" 'dynamic_events' -} - check_error 'myevent ^chr arg' # INVALID_TYPE -check_error 'myevent ^unsigned arg' # INCOMPLETE_TYPE - -check_error 'myevent char ^str]; int v' # BAD_NAME -check_error '^mye-vent char str[]' # BAD_NAME -check_error 'myevent char ^st-r[]' # BAD_NAME - -check_error 'myevent char str;^[]' # INVALID_FIELD -check_error 'myevent char str; ^int' # INVALID_FIELD - -check_error 'myevent char ^str[; int v' # INVALID_ARRAY_SPEC -check_error 'myevent char ^str[kdjdk]' # INVALID_ARRAY_SPEC -check_error 'myevent char ^str[257]' # INVALID_ARRAY_SPEC - -check_error '^mye;vent char str[]' # INVALID_CMD -check_error '^myevent ; char str[]' # INVALID_CMD -check_error '^myevent; char str[]' # INVALID_CMD -check_error '^myevent ;char str[]' # INVALID_CMD -check_error '^; char str[]' # INVALID_CMD -check_error '^;myevent char str[]' # INVALID_CMD -check_error '^myevent' # INVALID_CMD - -check_dyn_error '^s:junk/myevent char str[' # INVALID_DYN_CMD +check_error 'myevent ^char str[];; int v' # INVALID_TYPE +check_error 'myevent char ^str]; int v' # INVALID_NAME +check_error 'myevent char ^str;[]' # INVALID_NAME +check_error 'myevent ^char str[; int v' # INVALID_TYPE +check_error '^mye;vent char str[]' # BAD_NAME +check_error 'myevent char str[]; ^int' # INVALID_FIELD +check_error '^myevent' # INCOMPLETE_CMD exit 0 -- 2.25.1