From patchwork Tue Sep 28 00:11:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Masami Hiramatsu \(Google\)" X-Patchwork-Id: 514736 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp4623355jao; Mon, 27 Sep 2021 17:11:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx2ZDxQ0ESPB3CtylPVApM5fMEKWh+Tkxqt4gln59pxukyOZQrkq/cHdEPHjUSaVxWT8Y9i X-Received: by 2002:a50:8161:: with SMTP id 88mr3882558edc.394.1632787870408; Mon, 27 Sep 2021 17:11:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632787870; cv=none; d=google.com; s=arc-20160816; b=Nv1v0XDTPoIxvBoFbscJespb519tELRgLG8trXeSn1zBdaziaJe8N5A5VpCHkqEoAk X2D/cUmo/0j9TFUsd4tNJmeYXDaonVSi/GNY+cKZhMlfA2unaAOmLt6e6r7OVHQm+eqd +Q/qBYrF12Ux9HToWFcyPw9GeZBZ/X6l819ecxvl8awHaCIGCHr3JkmCqLuWRGELSqR+ d3NZN8HvULppBYaUx3APFw4aDL2IQNBk9agErhPaOIUVMWrnvhMwjBzSB2vMn/4EE0zD JExbnjErR0qLe1I9Se53MXHf4TGVVR1J81Fv8PktxjDsbqqCXOGrAIDEN6sQJLNsGy1F kBWg== 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 :user-agent:message-id:date:subject:cc:to:from:dkim-signature; bh=F8uRKvr3XzOCE8v/Mnje02EsZfOpRthno/jOpgbfyh0=; b=KeCNejqqE+IQSWPVF/0/9/9TeJGsR8IBwRvZo3nr/DT27bacrMZghd4JN+muKDS7DO wcD6ap/rw/Nw7uYvir0vvFOUxnjmrCi06ZXY5XRY/V5LrUH4crtc0gqAd+FUdpfu9Dz7 sWUEZvIpoQ2Z3lFRXKzbWYpzvo/AeCEBj17ztCcrIqsqMj3u84k6HgoVuN7+6JvL9WJ5 8CdeJ9rbP7L/3qmCFHaoQT+tbmrD4XW2WzJYNgUizZ4+89LvmVfn5SNCR1po9UTMxKl+ 6vbn/uT4loxUSE2qx5PubDMFuuCLSymgA8e+rg0iP9GtBx5r29UMMK8cfO2I62aNT5qq ydbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RJaEqtQX; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ec26si6111411edb.116.2021.09.27.17.11.10; Mon, 27 Sep 2021 17:11:10 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=RJaEqtQX; spf=pass (google.com: domain of linux-kselftest-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kselftest-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 S238268AbhI1AMr (ORCPT + 5 others); Mon, 27 Sep 2021 20:12:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:42192 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238253AbhI1AMr (ORCPT ); Mon, 27 Sep 2021 20:12:47 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 34621611CE; Tue, 28 Sep 2021 00:11:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632787869; bh=e0biuuUrxQBT6LwpPLtkePfaM2PRMIsMY1zCFndAnbo=; h=From:To:Cc:Subject:Date:From; b=RJaEqtQXdLxj6Bv/EYcrKJ4xld+xTLIqUyaaZth7z7NGNxViLNOX/7hH+DXJ2Pss3 erVJhPu5aeU7raUaGQbGnCQ8Z7FA0dmOJIeYDfWl6vDDa9XLEffU/34wMdKLx6oimn X28SO9GMjmBaM/bdoywAoFvNvrW3kAejHn+w4yOCEnZKXqEaUUI5ClQ/tSopmoQofb jtjs5Ne2ZikLopaJnt3gifHQ0l593ylx/iXuQTzkyGatobUpOIGvbPxvHQbCp0WuSk Hkb67Hb+QpO4nnPwkgw1xQBpkjtV5Ndkeikk19PhMpRt1rP041FwuJD41MV+cPFy4G wdgCd6DclL/7w== From: Masami Hiramatsu To: Steven Rostedt , Shuah Khan , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Masami Hiramatsu Subject: [PATCH] selftests/ftrace: Stop tracing before searching non-exist event entry Date: Tue, 28 Sep 2021 09:11:06 +0900 Message-Id: <163278786632.187921.7275187717663096458.stgit@devnote2> X-Mailer: git-send-email 2.25.1 User-Agent: StGit/0.19 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org Stop tracing before searching the pattern which is expected to not exist on the trace buffer. In some case, it will take too long and may not come back eternally because while searching the tracing data will be increased by the searching activity. I found this with enabling kernel debug options, like kmemleak, lockdep etc. and run it on qemu with 2 CPUs. It did not come back in 20 minutes and finally I need to interrupt it to stop. Signed-off-by: Masami Hiramatsu --- .../ftrace/test.d/ftrace/func_profiler.tc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc index 1dbd766c0cd2..440f4d87aa4b 100644 --- a/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc +++ b/tools/testing/selftests/ftrace/test.d/ftrace/func_profiler.tc @@ -56,6 +56,9 @@ clear_trace sleep 1 echo "make sure something other than scheduler is being traced" + +echo 0 > tracing_on + if ! grep -v -e '^#' -e 'schedule' trace > /dev/null; then cat trace fail "no other functions besides schedule was found"