From patchwork Mon Oct 17 09:07:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Rutland X-Patchwork-Id: 3298 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp1346600wrs; Mon, 17 Oct 2022 02:15:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM54LDNr+Fk2EQnlNF6A5bYnlVESBRuVaCFyeqr4bg1Ac+iOLyA0Ay7+dX1JMu40Yi1g70Va X-Received: by 2002:a63:5761:0:b0:43c:5940:9176 with SMTP id h33-20020a635761000000b0043c59409176mr9707876pgm.65.1665998125324; Mon, 17 Oct 2022 02:15:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665998125; cv=none; d=google.com; s=arc-20160816; b=oX8q3b2soVs46rkQVmU7Hbz56VXEenSHU85pszA2roMKZKduuitR8XiCCfAIr3VKvS n/7kv4A/dOca+qAP0fvIQBOWRdFbnoUcFYnoAgSn1FDvO9ZzswAqkdNDzo7QDcO7zI8e ig3kUWy38dRagsWyx5xSn4ixvxZEpJrhN6N5HhdHTesJrq9e8LlPFaLeX96YxXVsuTVS ct4FtiK8wkmlanwJUXFKYGV7fw/G22CMg1cri9u+a1fJknF4Y4OeUskphWx74fW4NC5u FBq1oo+2ijIsg70h+FszRoZX0cPFfC0eMA6F2gQEeprw+gQCt7n7SDm9l49iRAbnvxxC +lYA== 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=DIjPi9BrcbxxeVKPddsA8AyyqnGC2S/TwQ8vhG1CQvQ=; b=dUnw2QqZAZ5oATBY4ZvSzSG84aK60oPwKgUs7FV3tH9ji7d8rhPd86SPFNAsy9xEMu wA8XQRDtaBzBqjHmF0tr46NK6tccw04qZ6/N9RZpysdSMfmOkuP2GRkzNND0Lt9AM98j d139QcjoCLN2JdnRDOizlxoB5OBRQaxvZPRLVCHkAEPAg4Wb2iUNLH+Q5Z7krT01qUq/ lL/U3NVLoeR6RloOV/Yg1iltihRCe6HrQ669tGTwJr8uk7f2NmueGWANw68oGpy65epn jeTn0e2YiCjS/WVvaQ97mQpmIEG01/91/uGaDdmEsA5QyH5vqJ1AI3KqXdHTcxlGxOtH E3GA== 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=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h16-20020a056a00219000b005184183372csi11249824pfi.350.2022.10.17.02.15.12; Mon, 17 Oct 2022 02:15:25 -0700 (PDT) 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=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230190AbiJQJHy (ORCPT + 99 others); Mon, 17 Oct 2022 05:07:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230048AbiJQJHw (ORCPT ); Mon, 17 Oct 2022 05:07:52 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 8B44ECC8 for ; Mon, 17 Oct 2022 02:07:51 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 2882C1042; Mon, 17 Oct 2022 02:07:57 -0700 (PDT) Received: from lakrids.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 49EB23F792; Mon, 17 Oct 2022 02:07:50 -0700 (PDT) From: Mark Rutland To: linux-kernel@vger.kernel.org Cc: mark.rutland@arm.com, mhiramat@kernel.org, rostedt@goodmis.org Subject: [PATCH] tracing: fix dynevent test requirements Date: Mon, 17 Oct 2022 10:07:41 +0100 Message-Id: <20221017090741.2881918-1-mark.rutland@arm.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE 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?1746925650424469183?= X-GMAIL-MSGID: =?utf-8?q?1746925650424469183?= Currently a couple of dynevent tests will always report UNSUPPORTED and not run, even when support is actually present. In commit: 95c104c378dc7d4c ("tracing: Auto generate event name when creating a group of events") The README text for synthetic events was changed from: "e[:[/]] . []\n" To: "e[:[/][]] . []\n" ... but the dynevent selftests were not updated accodingly, and still search for the old text in their "requires" lines. Consequently, they fail to match the new text, and the tests report the feature is UNSUPPORTED. For example: | # ./ftracetest -vv test.d/dynevent/test_duplicates.tc | === Ftrace unit tests === | [1] Generic dynamic event - check if duplicate events are caughtRequired feature pattern "e[:[/]] . []" is not in README. | [UNSUPPORTED] | | | # of passed: 0 | # of failed: 0 | # of unresolved: 0 | # of untested: 0 | # of unsupported: 1 | # of xfailed: 0 | # of undefined(test bug): 0 Update the patterns to match, allowing the tests to run: | # ./ftracetest -vv test.d/dynevent/test_duplicates.tc | === Ftrace unit tests === | [1] Generic dynamic event - check if duplicate events are caught | [PASS] | | | # of passed: 1 | # of failed: 0 | # of unresolved: 0 | # of untested: 0 | # of unsupported: 0 | # of xfailed: 0 | # of undefined(test bug): 0 Fixes: 95c104c378dc7d4c ("tracing: Auto generate event name when creating a group of events") Signed-off-by: Mark Rutland Cc: Masami Hiramatsu Cc: Steven Rostedt --- .../testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc | 2 +- .../test.d/trigger/inter-event/trigger-synthetic-eprobe.tc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc b/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc index db522577ff78..d3a79da215c8 100644 --- a/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc +++ b/tools/testing/selftests/ftrace/test.d/dynevent/test_duplicates.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: Generic dynamic event - check if duplicate events are caught -# requires: dynamic_events "e[:[/]] . []":README +# requires: dynamic_events "e[:[/][]] . []":README echo 0 > events/enable diff --git a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc index 914fe2e5d030..6461c375694f 100644 --- a/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc +++ b/tools/testing/selftests/ftrace/test.d/trigger/inter-event/trigger-synthetic-eprobe.tc @@ -1,7 +1,7 @@ #!/bin/sh # SPDX-License-Identifier: GPL-2.0 # description: event trigger - test inter-event histogram trigger eprobe on synthetic event -# requires: dynamic_events synthetic_events events/syscalls/sys_enter_openat/hist "e[:[/]] . []":README +# requires: dynamic_events synthetic_events events/syscalls/sys_enter_openat/hist "e[:[/][]] . []":README echo 0 > events/enable