Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15924646rwd; Mon, 26 Jun 2023 03:22:59 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ59UvXoDnG2Plne8KI9LOfk4cYr44aOTxqIQewbCVtQOCgTqDU+iJllIo0wNQHUoTxuCETY X-Received: by 2002:aa7:da8f:0:b0:51d:9693:5124 with SMTP id q15-20020aa7da8f000000b0051d96935124mr2285049eds.19.1687774978816; Mon, 26 Jun 2023 03:22:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687774978; cv=none; d=google.com; s=arc-20160816; b=I3ioLSD65m7omgy89e3Skq3dg1QU2A2LiLBOefno99t516+GjEtqdExbGP8BBOfM9Z sp+uNLeKSBQhj3DgU3HCVbo7HsgqTxOvm6bT46r3FsEqP88OozvCOazGelwjyOPpOkYp qNNH0QHpBrdkKmw5Z12BMdjV9zKa80ccMttKObQLAFTCB3M5LHQYavzyLRaoDC5BEe79 FsyqgvXT+stoqR+fgOHVM1MVMIO2jPfLPKQ+/V9CJOzDN1u7jXeETithY4J82jBKO+cn JT0j8sB3xet5cL2QwmdQcvVNxAP4W9J917jfwyg12o2tLJeh0pnr6xr0zbYFlE6LU3P1 mlOg== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=XBUMAp2jak5f06o74xekjiNmKrqk0nzA4mIrFXSy4OY=; fh=WzPF5HnLmAlyUbC9OD0bqLmdxXrlSPM+k9CWryauXUc=; b=NmvYjfOembqu++7vhoDAB621enHObxJUrwC8ja4bKUZRVY0HA7TekIodsScUGxJXO5 Ud9kGPI/O3DN3fjAApB+BlE/V4P1inmOFF60OvFV1lirCLbfiSrU4DX+opvAIg3+kZ2s 2n/n+AUNrGgXaK5v4QfoCiupWgXqNGJX9r2A7/5IaR4CMn2NmhfFi6D2j4U9eBV+k15P OxjIxAuX7s1BLkmtBynzaKCXGFA1CRwwKhFmTe8WVbk0B/Uy4zg76Fu7L6b6nI5fbYLl ZAmvLVfE+POvSz8nUybzulmbyY5Ddyus3VudSUQRb2HtmMt2bPDWSeiFcXS3asSzZT0B YIWg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KJWphZS2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e12-20020aa7d7cc000000b0051d890b2406si2197637eds.611.2023.06.26.03.22.34; Mon, 26 Jun 2023 03:22:58 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=KJWphZS2; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230030AbjFZKNC (ORCPT + 99 others); Mon, 26 Jun 2023 06:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjFZKNB (ORCPT ); Mon, 26 Jun 2023 06:13:01 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5278D18E; Mon, 26 Jun 2023 03:13:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC11E60DCF; Mon, 26 Jun 2023 10:12:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E57FCC433C0; Mon, 26 Jun 2023 10:12:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687774379; bh=kpLEOgBekJKzTbb19C33i9D78u2j2+zBDjlD73GNP94=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=KJWphZS2G90c951n2Z7eKff79huYUejh1Jx/pPWoxCPR3p9tT5v2uMhIvZd/WnkpJ NN8msgtncrcjrNn6hUfdSTgdn0MCx2ZS4aKXNwE+a1WQ1rmjWXdV2pcshaoBPSCCjM BvDCy0mFCm4DdeKIAQZa4aVkgbuTbPvZmozjjBJ93DKXpWOgt3Cynqnc4ksGp971t2 bfQv/MJGtfzHQ1R0hfA6KDf827wknEXU1azFM9mNUzjqTO3dyaYQQj36wbbl1h0Vtr 6J48VtjklBSd6LdstUV/oANBd4IvLn0ArIWtyIh+zK9dG4wSEvZC5rWGG8qUwYI3uT Xegc0+dzWq9fQ== Date: Mon, 26 Jun 2023 19:12:55 +0900 From: Masami Hiramatsu (Google) To: Masami Hiramatsu (Google) Cc: Zheng Yejian , , , , , Subject: Re: [PATCH] selftests/ftrace: Correctly enable event in instance-event.tc Message-Id: <20230626191255.53baab4ed48d7111dcd44cad@kernel.org> In-Reply-To: <20230626191114.8c5a66fbaa28af3c303923bd@kernel.org> References: <20230626001144.2635956-1-zhengyejian1@huawei.com> <20230626191114.8c5a66fbaa28af3c303923bd@kernel.org> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 On Mon, 26 Jun 2023 19:11:14 +0900 Masami Hiramatsu (Google) wrote: > On Mon, 26 Jun 2023 08:11:44 +0800 > Zheng Yejian wrote: > > > 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 > > > > Good catch! > > Fixes: 91e6f1ce8657 ("ftracetest: Add instance created, delete, read and enable event test") > > It seems this tests internally broken but the result is same because this disabled > error checking ('set +e'). And Acked-by: Masami Hiramatsu (Google) Thanks! > > > > Signed-off-by: Zheng Yejian > > --- > > .../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 > > } > > > > -- > > 2.25.1 > > > > > -- > Masami Hiramatsu (Google) -- Masami Hiramatsu (Google)