Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1127261rbb; Sun, 25 Feb 2024 22:09:50 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCU7bRsdZT+R1bOtO1E/1BsCRuh1q1gWldFokINWtCAQs8Y5GccHSx5RlpQC+UQ6jQyn1+A1B3SQP4VPVmtOlO4phfSThJU5Sc1o3N7mcw== X-Google-Smtp-Source: AGHT+IEMzZdSpH31UM9Hql7hDAqxK9K3Fos0YEbHjSgHpVznTcNUMgE/L6gNkk3PpkxxJlMBEzRO X-Received: by 2002:a05:620a:3181:b0:787:bb6d:8b7a with SMTP id bi1-20020a05620a318100b00787bb6d8b7amr9568278qkb.3.1708927790391; Sun, 25 Feb 2024 22:09:50 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708927790; cv=pass; d=google.com; s=arc-20160816; b=OMs2BxJCOXcOWqcixd6HePt9iXAASESqdbdk2/rIrn0EKgV+3ZAGzjdjwuKX2hf1ho 7stR90xzGfXh4HoFurZqH7rbi+SmifPLBCCWlCMxBEfZGLZDljchR4c5R21ST4nvtJCz vTCxBpEejA6rSotbqVFBp+0cCXBXXVRIKZx4MDg9+mJHJ6RcW/MAzpyQD96xsgPb5ZmL Lv5yjcuxxHTMPkbdk2v5gUw9kdldO7AkG8oQRVEKFR+Xh7Pg2SU2z2bC6t0UZ+CvBK0g W4EVtAYMf3kkeuo+pcJy4KY9PX7aeNnEvVX7gQGvhwX5KlUSUG3p/aghH525xUvvXuQK PG7A== 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=CwMpKEhme+vxZKEfN3jBPsVwzY6k9BSkBoTNSqZrLag=; fh=DI+sDhL2twEJyE6VHrrcX4X0zYlthIc0DTlJgqxPfBM=; b=OX+iK9B1dftGlqDR2pL1iRfIMaEinGhnzDeLYc6y3qY+Z9XSIoBiFxMG8s7M8PgsiC QM9wBJ2HMuyEGmEoG2cyYcOe2kANkAvrvvCvVxpVXfyjAJ+AVWIm7j+UdO3uhgBGBEaX RBxagEa/fys850NZncwpY6WCB6Rtr+drf0d2NKsKLJdq7RFlnDE+JT9RtjcSSBFWNoRv Cu6wV4e/UqJLYOyp7mrWo6vV1Kj28Jx2wP5IOn2fwpun1m4iSBYrskvq/bwp2mus0jEd MhnWuBAnslCT4EnBeVoBp51RyR9H8W8XXA1hIWC2eEPdmuE1vod9eXJl4CCHld5pY/m3 +9Lg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NkhixDM4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80580-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id r4-20020a05620a03c400b00787843d906bsi4264293qkm.590.2024.02.25.22.09.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Feb 2024 22:09:50 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-80580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=NkhixDM4; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-80580-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-80580-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 29CF71C2061F for ; Mon, 26 Feb 2024 06:09:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 398521BC4C; Mon, 26 Feb 2024 06:09:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NkhixDM4" 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 4BC2A1B968; Mon, 26 Feb 2024 06:09:42 +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=1708927783; cv=none; b=HWnigoYgZuo65Rua7v7ar/AkmJx3hI0ZojEMrNfObglieuqXavArT14341CL+WYh0kA4Zqu5lPq/5qtnpOLf66WBRWAZFgCh35gaJzrKxkiErjZQMvUsTP+GP6UWSu83SWyIz4uDpYK2Zpz2lOYFrg6cDWberUnWdvI8IPKDXjc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708927783; c=relaxed/simple; bh=Wg0yZ4YD42v7JFgC4GCKHPnWFfnRgGsgvkto9DA5mpg=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=fkJAmbQUNi5I1rAzHZEpt/6TCc38k2oJXVVy8oTpJ8OfjGB4iRacwCrwkyjJvl9jKDET8sg8lwkG4fTCKve+YI/PE0WAc4CmsH7/LvcKazyOMfqBy5ZaBT1/wTZCkXsTlXeVtS6Z3KAbdJc+fMp9TG7cRPpzGNL2OIaXUDsIDcQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NkhixDM4; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E751C433C7; Mon, 26 Feb 2024 06:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1708927782; bh=Wg0yZ4YD42v7JFgC4GCKHPnWFfnRgGsgvkto9DA5mpg=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=NkhixDM4clXdmyPifKygz4j+8mlYVFKXuWlUHCsap8pE/3CxfUcMA7zlQ9gjkyxLy Iv4TlijA9xZAQjIgBfU/gUL0uKcC2KdZ8vP8Y63SH/rMmULJFV982dYvrQMOmVHvFs krod4G3aGgoLVClGpryu4iCyZhd5xRg9/ncYvfsKTXYxA0e9fWXewK56PDP9urJrSU jV0g5KLYyIeB0giOvCK43Zpkl+/79BtrkDgCECZyPF5xSJkrf1MLAH2uYRBlc4Peih I3ivGxIqTSSurO9cJFGrZrDwuVW16oNWCmAGi2bM2hB2mGpcGohfkm7dHrWchA5iNa HpoO7UkPk/qxA== Date: Mon, 26 Feb 2024 15:09:38 +0900 From: Masami Hiramatsu (Google) To: Yuanhe Shu , Shuah Khan Cc: rostedt@goodmis.org, mathieu.desnoyers@efficios.com, shuah@kernel.org, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, stable@vger.kernel.org Subject: Re: [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests Message-Id: <20240226150938.7f0d8fd639bab79199d8556b@kernel.org> In-Reply-To: <20240226031816.88715-1-xiangzao@linux.alibaba.com> References: <20240226031816.88715-1-xiangzao@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 Mon, 26 Feb 2024 11:18:16 +0800 Yuanhe Shu wrote: > While sched* events being traced and sched* events continuously happen, > "[xx] event tracing - enable/disable with subsystem level files" would > not stop as on some slower systems it seems to take forever. > Select the first 100 lines of output would be enough to judge whether > there are more than 3 types of sched events. Looks good to me. Acked-by: Masami Hiramatsu (Google) Hi Shuah, can you pick this as a fix? Thank you, > > Fixes: 815b18ea66d6 ("ftracetest: Add basic event tracing test cases") > Cc: stable@vger.kernel.org > 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..b7c8f29c09a9 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 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 > @@ -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 trace | grep -v ^# | awk '{ print $5 }' | sort -u | wc -l` > if [ $count -ne 0 ]; then > fail "any of scheduler events should not be recorded" > fi > -- > 2.39.3 > > -- Masami Hiramatsu (Google)