From patchwork Tue Jan 17 12:47:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Yejian X-Patchwork-Id: 44654 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1734605wrn; Tue, 17 Jan 2023 04:48:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXsEDhGGu8+YQ7BmnDMj4DWRzOJ9xTaclK9DhUp8OQtjX9m08l1xiuW1vYESU5G9IZcJ1ygr X-Received: by 2002:a17:902:e88e:b0:192:b2d3:4fc8 with SMTP id w14-20020a170902e88e00b00192b2d34fc8mr3311268plg.1.1673959690324; Tue, 17 Jan 2023 04:48:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673959690; cv=none; d=google.com; s=arc-20160816; b=nl4N/tFtpj74uJMIzgx39hOknRc4gCiWMXo59z4XObVNXMMx3sgekcspQXWOBTrimY 1KH9cw/yaL5iqX10F8dIaQJF9pfWueD6LVZxzMNJCjE2X2G6EoLomubBGr0OdmxBuBVY DvgfduDj8CkwsnQqkNMXLw7MEQJRh/0NdhfifC6kVl/mfrC+tba1Nm8UDkdDVj/dXe6e PgCv/Pqb8J5a7rRtuIbMLljufnvgUlSueydcvYwQoSR59/jjQ8lJqZiDIHj7By57Hjg1 cse+mNXV9OsXNDD7XmHx29+HjHMk8G4GszzHdH13sQOdUHWo/WLqfkTZ52lwPJN98+hn 7SPg== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z6-20020a170902708600b001842f465c10si31236222plk.438.2023.01.17.04.47.58; Tue, 17 Jan 2023 04:48:10 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755273956333535495?= X-GMAIL-MSGID: =?utf-8?q?1755273956333535495?= 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