Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp999998rbb; Sun, 25 Feb 2024 14:31:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWiV7wru+CnM+aSbLScTaqmvwYLNkQ9z5CrYRHGstO7zgfrLm2Wy+4J0GR0Mo1eaPF7B9ev10azhtjdvXDSBFxGl7w1GjnMuqKutK4ovQ== X-Google-Smtp-Source: AGHT+IEawZrjwK0rD0UutXrELmGYQI2L4pD0nSsjqhHJBpg8sqdMcFo42Cn4B2O9kf4FiH5KLOJn X-Received: by 2002:a17:906:1159:b0:a3e:feee:3a5b with SMTP id i25-20020a170906115900b00a3efeee3a5bmr4544794eja.3.1708900273089; Sun, 25 Feb 2024 14:31:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708900273; cv=pass; d=google.com; s=arc-20160816; b=EBD76R6suV9JgjXr9Ha1aMhPTwXiaNzxvoqOCn+B+Nqo3j/GziD2TTOVo3s2Wi45MQ +xfj87BxwqaVxUfIcyW1dQOQ4uHnZ9mu8QCaS/ZLySXXew2wiLeWVlNHIfEqEK9uTRRN iolRWcDj9Y102LWBDf9f3iHLmP83NhNw55eCKCMAitzVdQrE7g7NrlFyNphZvf98ah0O MafAWk3OrUsunZrP+pVwbW050JtmVgn1RM0yyASjJ4AQxKa+xBX4Te9ZLVbY3bf6gn5I I2LcHiNgkRtcCszTuSiS5gjtGwVNUkdg3plbi5mxRO5+52LbqoCpGumOBHNLMTaqi5Sl 4Huw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=lEwlFXDHDrYTfyUJ2VHycUmmqFGX54RJ7P3sDCxrseg=; fh=wsEG6jEw6z719NTVk+zwQOnanuLTyNdrQvT87Rv9mdo=; b=iIIF62GfGSoZ4bortipc8KC9aGdfmcOwCZCmobzwBk0qK/jeRoh3s3W5J+3bbPFQLn OL/DpBY65myMyPSUAsECmNis+/o7zhUZGXdY6xw3sPEZIsMGsNwPpenLfgV15wrwFIEl D7K6ag0W9yd2G5vP3g9AHc5erkpf2p0utywcs7CGPLWOao/0kz3wbc9qAGFshRudeAa3 q+KtgyjrbCaWcFfNlcT+nBLwcIctyRYo9vglxTsyb39VsGGP3A7Qx9KJ6lXKxfchViQD C6T6/c8nGOSxemUey+McmhXgRCXRNKnq+8grqNW1Iy8S4skIsqtKf4+CN4QbMHJZuxrX RFFA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K3HkDmtg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80324-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id ga19-20020a170906b85300b00a3e0d50c7edsi1520003ejb.26.2024.02.25.14.31.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 14:31:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80324-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=K3HkDmtg; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80324-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80324-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id B3E561F216AD for ; Sun, 25 Feb 2024 22:31:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 229E8DDDF; Sun, 25 Feb 2024 22:31:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="K3HkDmtg" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2EE5018B1B; Sun, 25 Feb 2024 22:31:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708900265; cv=none; b=isytdxBDwHEQqFt13EZaISPUzR+OAI+brEat4ztG9KrAhaac/mHUwyynpXN0VoGqZgQK3iWmUS63pbvwNyb5Z2sOBRKkXSTklnH2U1HDzlvLnBieE8eHF2t1IonQlTH4wNZH8Ag0DqtqsycQZRYaPpuZJPIRzXKda8v0svLMtvI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708900265; c=relaxed/simple; bh=O4RTJudC8dhdXwVBJwoOhnqRe04W05XJHkcn8rJWNQ4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=mYzYaaOzuniag+1JjD5d8xnynj0lxrLgcBJ0O0jEO/d7FOhH4c3BN4JgafKDo0c2TQUMM1uJq7bltZiIBzKk4e3sSQ3DJFPqPzF3KV5Jic+6IRBz1KvUwe6NsHvttRY79ofbHSeGP7TfzUmJd3IGYkBxgNOEJl7SRRuFdEMgxBw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=K3HkDmtg; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6E205C433C7; Sun, 25 Feb 2024 22:31:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708900264; bh=O4RTJudC8dhdXwVBJwoOhnqRe04W05XJHkcn8rJWNQ4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=K3HkDmtgDxqylZDyENqH3z+Xa6NVEcHQ50hLSBnTmV2fdif/el1XHPPbZobaKKizk SkL7qII/cWlmo29ZsGFkluc9tu/m1/Hqu1nDqJ0Q1eBSPXEmJrK+/iB7XVBfobY4fG ETHZDeV51hyx0tacQf+kVlDHpgr6ACBxN/2Ar8wvzjsCxIZ//2+p5MPvotjUMdRcK/ Zy4qjv6fpaUEg5bQsL5hhhYamF5iitZQZVWWf09sylMFSOmhGfd/CqKFPzNcmiWHDm NDoMBGc/Jeg2aOXgQXaADgk6FIfsAlcNQwAJoY3dM/9nVdf0D86TPz6fUp42JeszR0 RgnA4vpyX7/Ww== Date: Mon, 26 Feb 2024 07:30:59 +0900 From: Masami Hiramatsu (Google) To: Yuanhe Shu Cc: Steven Rostedt , Shuah Khan , mhiramat@kernel.org, mathieu.desnoyers@efficios.com, shuah@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] selftests/ftrace: Limit length in subsystem-enable tests Message-Id: <20240226073059.ad066900241022e704f72955@kernel.org> In-Reply-To: <7420f9b5-2283-419f-8c6b-705f8b0c53f6@linux.alibaba.com> References: <20240205131233.13686-1-xiangzao@linux.alibaba.com> <20240205082120.4144fb6f@rorschach.local.home> <7420f9b5-2283-419f-8c6b-705f8b0c53f6@linux.alibaba.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Thu, 22 Feb 2024 20:14:56 +0800 Yuanhe Shu wrote: > > > On 2024/2/5 21:21, Steven Rostedt wrote: > > On Mon, 5 Feb 2024 21:12:33 +0800 > > Yuanhe Shu wrote: > > > >> While sched* events being traced and sched* events continuously happen, > >> "[xx] event tracing - enable/disable with subsystem level files" would > >> never stop as it cat an endless output. > >> Select the first 100 lines of output would be enough to judge whether > >> there are more than 3 types of sched events. > > > > It's not that it never stops but on some slower systems it does seem to > > take forever. > > > > Acked-by: Steven Rostedt (Google) > > > > Shuah, > > > > Can you take this through your tree? > > > > Thanks, > > > > -- Steve > > > > Thanks for your ack but I found that I missed the 2nd and 3rd 'trace' > after 'head -n 100' in code. Should I resend a new patch to fix this and > meanwhile modify commit messages according to Steve's words? Yeah, please fix that and resend. This also should have Cc: stable with Fixed: tag. Thank you, > > > > >> > >> Signed-off-by: Yuanhe Shu > >> --- > >> .../selftests/ftrace/test.d/event/subsystem-enable.tc | 6 +++--- > >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> > >> diff --git a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc > >> index b1ede6249866..74c1114603a7 100644 > >> --- a/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc > >> +++ b/tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc > >> @@ -18,7 +18,7 @@ echo 'sched:*' > set_event > >> > >> yield > >> > >> -count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > >> +count=`head -n 100 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > >> if [ $count -lt 3 ]; then > >> fail "at least fork, exec and exit events should be recorded" > >> fi > >> @@ -29,7 +29,7 @@ echo 1 > events/sched/enable > >> > >> yield > >> > >> -count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > >> +count=`head -n 100 | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > >> if [ $count -lt 3 ]; then > >> fail "at least fork, exec and exit events should be recorded" > >> fi > >> @@ -40,7 +40,7 @@ echo 0 > events/sched/enable > >> > >> yield > >> > >> -count=`cat trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > >> +count=`head -n 100 | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > >> if [ $count -ne 0 ]; then > >> fail "any of scheduler events should not be recorded" > >> fi -- Masami Hiramatsu (Google)