Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp15951526rwd; Mon, 26 Jun 2023 03:50:40 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6erQ6XWQKcR6oSPeLOb9cfOgFTLTC2j+MyJqz9UOmtpfiTTl6yS0FzRtSe/OEEoCpaR5Wc X-Received: by 2002:a17:902:a9ca:b0:1b7:f64b:378a with SMTP id b10-20020a170902a9ca00b001b7f64b378amr2046509plr.16.1687776639819; Mon, 26 Jun 2023 03:50:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687776639; cv=none; d=google.com; s=arc-20160816; b=FGCqvJCKceA854v+xuGJuUEeXpIbCPO8/q/PqpBPqyztz9q7SROTYneM+Ph3JY9u+Z V/AZH2vMTNzkAhafV4ptRUFqigM3qBccFF/cRx0aopuxnwKtCVgTgHSqk1bn1qIT8sgu 8/MrJ0WMwrbVt24NZ5InlvJWYHhHJ/sYlQIMrFhRewcUV2zvN/L14prp0L/NK0fI98tE J2c6IZtlKLYTiGqFJ2ZWIgRv+swwWveL3RkbT5yCcvV9DL8SRVX78pBXaghl3gpnNOxP S/QsTnnLU8Rb0temzADBDVGAM6t+uwd/ZwXcKYxQzp9EbBFxJwyvbVRs2t4RA2joLwb6 /XZw== 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=ooK2OGKgn5EHCUM0JI83YaG06QjhnVSfVR+BARD4Gtk=; fh=SNy0lKBpMFTD23JnpiEMLxEmlQuLEKw0V6ehh+mORG8=; b=AxFwReC9zJAMgGh1X8BYLwWMa5JhPmoibZj5PIZeXMFD0ex9XgUtQQ/sSrtrIgWeU7 xrPdyRcpo+ssJavpnbIQjmHJTY5fUBXc90UnGOPwsUIAaxUHeaRcRtUiF63m1/ytyKBp iAcizohiqjiU8ohuvAtbP3XGAJ9AuCWMKsgbF9UzlLKia7YxLHdsJF0IVDDNR5/o9x/K aVd85GoKm82Z3E8QJ1NzNGsVE6SCEHyx0mL6U6wz4+S/sYzB1LK9x+sBqNY3+Vfv79Ek /zBSFC7G7MYaLOKVyCo/Gn3r1NyhRl8jvgemxzJnxsd9tgrpQ6RHvFXWgHPYNu63jM6y afgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=S33wlwGp; 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 i12-20020a1709026acc00b001b807a250d9si1302067plt.275.2023.06.26.03.50.28; Mon, 26 Jun 2023 03:50:39 -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=S33wlwGp; 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 S229805AbjFZKLW (ORCPT + 99 others); Mon, 26 Jun 2023 06:11:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229470AbjFZKLU (ORCPT ); Mon, 26 Jun 2023 06:11:20 -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 9E668122; Mon, 26 Jun 2023 03:11:18 -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 157D560DCE; Mon, 26 Jun 2023 10:11:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 209DCC433C0; Mon, 26 Jun 2023 10:11:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1687774277; bh=4YHpkBG4aA7i8xH4eshQAQ4K0/sv3v75SdKGjPD5YWg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=S33wlwGpZhRxup9sYTndZS+gQIg/YMmwCJ5ywIAAr0v7i/3XU8hvh3ft+G6IAKG+v NmVDStCVHrg9zsheT6044AT0nqGUPBU8DxpVrQV7jVfOdKS1kP14Sf4Lcda4Scy1v5 0xBcWDjQybSFycxMRPBUv0jO2hZb77QGY8cT9Xf5YqIT6qHhnts4J7arrUc6wDFKYF 72ZDCnTQs+dDdor1MKacc6IzNHsAYzimBWMTz74a2WoApq9hAZHPq2D4i6ilsW0Img 9kLtmVSir+pNsRd0zi2Ad0YxqGsGc/2SQ/WHzHZY6+HWRZ+p4USmGYp/ktEdoNMOAl kngCNkLWRQvRw== Date: Mon, 26 Jun 2023 19:11:14 +0900 From: Masami Hiramatsu (Google) To: Zheng Yejian Cc: , , , , Subject: Re: [PATCH] selftests/ftrace: Correctly enable event in instance-event.tc Message-Id: <20230626191114.8c5a66fbaa28af3c303923bd@kernel.org> In-Reply-To: <20230626001144.2635956-1-zhengyejian1@huawei.com> References: <20230626001144.2635956-1-zhengyejian1@huawei.com> 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 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'). > 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)