From patchwork Mon Jun 26 00:11:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheng Yejian X-Patchwork-Id: 112570 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp6883377vqr; Sun, 25 Jun 2023 05:18:13 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7+jnNFNIqzBstHOPmZsEkdqZJAvHAtkyZJX2KvslDAFZKlNI8219amQzXtz6ykornTJbEg X-Received: by 2002:a17:90a:48:b0:260:fe48:491f with SMTP id 8-20020a17090a004800b00260fe48491fmr7642866pjb.45.1687695493388; Sun, 25 Jun 2023 05:18:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687695493; cv=none; d=google.com; s=arc-20160816; b=pguWLPujb8hY5eS+HP4DDAz1E8I6OV8R5tctcOOfvQZGGJpRQ91y8zi0hbcl/iAO06 aLdKiZUTncddkaxnSR5ePpn5kORN6J1VhZVDJr7ivWLIFJXzk9F6gMsCiUCOJB3GnpUq f0p4nBbIme2mqpTgYFcSD2ou9CKyOrD08sEo3llcmOGRkc8AlZuatvMSMnKKiX+wZWZb WCMmF+ixR7kqRq2jDr8X2W2JeoskrzFLheXarB4oDEt6MkpzosoWBzGk7q/aPFc5iLI+ tFuUcI8frQZybk4tj6q6l8MW9CDOeWhpBSfZvAf6JIeviZ7f5/bsgvCfYCt/50qg37sx SgvA== 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=hCM+fAwfioLInm7uXA3EpvVxVkjpIWpyyOyBzhqAl7Y=; fh=3bHNZKou9gEKyVVc34HWFD96ByTt1t/guH1ehzRyJhQ=; b=er9wrLAlBjBEzbAM/TkCAsSam7V2rl8O2ywgjMzd+K18s6AuWNpHMUfhxdqRnvJ5U8 37wQeZK5MyEWaFJV9HwSv6c2CrrayZN+4k1X9lZtU8li2oBBq5ntY1sU9mQ5Sy4daKOc RrEks0AtUCq7vx+BqsImCYxcWBAP5o+OW77kCJlAvEQqdUQaVa7YqWyru5bQepy84PBo iGTSOzaYjCGSqHzUBT7Ns6ebeuZigQ8vGtH9SB3okl1GaeqnUPkDwH4OS9ARaetOBPAG LV7ezAzQj0V0H2D4REpZknyXcT8D3/2F9SYdSyw3EO/9zAFyyC3DQXuJPq4e5OG6tHk2 PzNg== 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 g130-20020a636b88000000b00553c2f85095si3069717pgc.832.2023.06.25.05.18.00; Sun, 25 Jun 2023 05:18:13 -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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230318AbjFYMLb (ORCPT + 99 others); Sun, 25 Jun 2023 08:11:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231152AbjFYML3 (ORCPT ); Sun, 25 Jun 2023 08:11:29 -0400 Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 50FA8115; Sun, 25 Jun 2023 05:11:27 -0700 (PDT) Received: from dggpeml500012.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4QpqXL5vT4zLn4C; Sun, 25 Jun 2023 20:09:22 +0800 (CST) Received: from localhost.localdomain (10.67.175.61) by dggpeml500012.china.huawei.com (7.185.36.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Sun, 25 Jun 2023 20:11:24 +0800 From: Zheng Yejian To: , , CC: , , , Subject: [PATCH] selftests/ftrace: Correctly enable event in instance-event.tc Date: Mon, 26 Jun 2023 08:11:44 +0800 Message-ID: <20230626001144.2635956-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: dggems704-chm.china.huawei.com (10.3.19.181) To dggpeml500012.china.huawei.com (7.185.36.15) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DATE_IN_FUTURE_12_24, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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?1769676989676505841?= X-GMAIL-MSGID: =?utf-8?q?1769676989676505841?= Function instance_set() expects to enable event 'sched_switch', so we should set 1 to its 'enable' file. Testcase passed after this patch: # ./ftracetest test.d/instances/instance-event.tc === Ftrace unit tests === [1] Test creation and deletion of trace instances while setting an event [PASS] # of passed: 1 # of failed: 0 # of unresolved: 0 # of untested: 0 # of unsupported: 0 # of xfailed: 0 # of undefined(test bug): 0 Signed-off-by: Zheng Yejian Acked-by: Masami Hiramatsu (Google) Acked-by: Steven Rostedt (Google) --- .../testing/selftests/ftrace/test.d/instances/instance-event.tc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc index 0eb47fbb3f44..42422e425107 100644 --- a/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc +++ b/tools/testing/selftests/ftrace/test.d/instances/instance-event.tc @@ -39,7 +39,7 @@ instance_read() { instance_set() { while :; do - echo 1 > foo/events/sched/sched_switch + echo 1 > foo/events/sched/sched_switch/enable done 2> /dev/null }