From mboxrd@z Thu Jan 1 00:00:00 1970 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 3C7C4143895; Tue, 23 Apr 2024 21:46:19 +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=1713908779; cv=none; b=pQH3PjBJ28hKdSh2CKcZB8ItuXh2vW8CP2gLj37n/pyRoFQLABfwlBm9/YKJ35f2j77jAjfBOux2EvQEDtdA6uIUMbF+z/Jfy+bUbQGs1IjsmN7hkSw2IXGmxpa4FUG+hCPaRKeuxWcZyUzyCTrJm4ZprevX6FzK+xsAt98SWAs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713908779; c=relaxed/simple; bh=8PZQnVfO3LWOMyCjHztGuc78dwla7Z2+nyQSlVWGeaI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FolucOlZ/nv+rLMNT3EpiIexPbdlmweNLUDFB5f+zFUGLCTfo9sS/R4ACS5bsGBOOXVUQevCn4wfA8Teu0FyUaZ0yMxaFgIhr/LjjS1Lmf7T+ig/W/B7D+ecXJoabaKQUp5bob87xlz3pwVU/eLfQcOiyyRvglhT5OTqxFaKQFs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=H34EgaLj; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="H34EgaLj" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12504C4AF08; Tue, 23 Apr 2024 21:46:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1713908779; bh=8PZQnVfO3LWOMyCjHztGuc78dwla7Z2+nyQSlVWGeaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H34EgaLjiO9bXR1EG+P6V4O9LfXcoSPFkYPSo3kTvqnczDcX41UVWNhGtDVekDq7L p2niM2Fa/UdUnFXXCRx0zRz5BOSPY48S1V7bn0OCocznGF9CduYGrYSRVrYDNrnjCr UeSdtCyigP683UVe//A6QgU/APKntEM0z4SFd/uI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Yuanhe Shu , "Masami Hiramatsu (Google)" , "Steven Rostedt (Google)" , Shuah Khan Subject: [PATCH 5.15 06/71] selftests/ftrace: Limit length in subsystem-enable tests Date: Tue, 23 Apr 2024 14:39:19 -0700 Message-ID: <20240423213844.343429908@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240423213844.122920086@linuxfoundation.org> References: <20240423213844.122920086@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Yuanhe Shu commit 1a4ea83a6e67f1415a1f17c1af5e9c814c882bb5 upstream. 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. Fixes: 815b18ea66d6 ("ftracetest: Add basic event tracing test cases") Cc: stable@vger.kernel.org Signed-off-by: Yuanhe Shu Acked-by: Masami Hiramatsu (Google) Acked-by: Steven Rostedt (Google) Signed-off-by: Shuah Khan Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/ftrace/test.d/event/subsystem-enable.tc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- 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