From patchwork Fri Mar 10 19:20:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 13169989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7C3C6C74A5B for ; Fri, 10 Mar 2023 19:21:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 093D66B0072; Fri, 10 Mar 2023 14:21:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id F38176B0074; Fri, 10 Mar 2023 14:21:07 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D63E96B0075; Fri, 10 Mar 2023 14:21:07 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id C2E806B0072 for ; Fri, 10 Mar 2023 14:21:07 -0500 (EST) Received: from smtpin17.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 7FBC240304 for ; Fri, 10 Mar 2023 19:21:07 +0000 (UTC) X-FDA: 80553956574.17.453AF0B Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf17.hostedemail.com (Postfix) with ESMTP id AFD9E40012 for ; Fri, 10 Mar 2023 19:21:05 +0000 (UTC) Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TJlvsCbz; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf17.hostedemail.com: domain of zwisler@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=zwisler@kernel.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1678476065; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=BmkTKs+wcqZgQT5xMF3LQhEToSvbX2IFjpGdyAHx//I=; b=Dl5Aa0E31dAAmwKZ/RyccBzO1aDB3qnPXrjq0aOSyhYrjtkHmWOf/ff68y+BXfLgQkIovg 4Y2ve9Xt+OOAxhNtTkeKq4//PspFF/GthVN4JmzwcffLS5AMEUbNY6hlrIwyhOodzIzONQ DtLG5TOdfUft2lHdu0N+/QfzX6e5fHg= ARC-Authentication-Results: i=1; imf17.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=TJlvsCbz; dmarc=pass (policy=none) header.from=kernel.org; spf=pass (imf17.hostedemail.com: domain of zwisler@kernel.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=zwisler@kernel.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1678476065; a=rsa-sha256; cv=none; b=rs7SZnBErMVMo7pGSEMLnvBzA7wDxwxhhbxKCXnLYOja/1KMMCn0nxvtZzCKTJV6lX50rv 4ObOc8r2OxnAvE7Rh+Fq8EZaPLMFQSwtg1EYR1SlCl6Xvo9QqYUqLpL4C4syxXcXDqJbbY 2E1/rjW/+pITtepKbskw4zZycTvzMHU= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id AAC0E61D4A; Fri, 10 Mar 2023 19:21:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3C841C433EF; Fri, 10 Mar 2023 19:21:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1678476064; bh=/Rg3otAfWIfcGHEh5SOOjD8wJ1PbvmfxogXF/vFficw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TJlvsCbzL6MyXQm4Sis6p2ve3MO247C+KX+ve3wn6jNLcg4aCkHR3eoILykS4XV+Y H0GgYCXxs7y79R2Y7YSw00iFqFTCQqh083r8a7oXwqHv7nU8WtL0YvQjpBbNI3xd54 QMcxhfNB3kJti97u3bFRuuba+MXsv9ALeKiMq9h4hhbUFWvaxOXiWXD2T/+4AdW1xl 5OJqbAYvqHVR3eMCRw0ac8sy/19SWVHrnZ4ByZGBtN4QNC/izdgYuQG1dCkfZKbS13 FFdyqc0PHe5pkfjTK7OTHz5AapIKgG8SpI3cxmlw8PC2DShMRNUltv8WId0fpEDGH5 J204/qa7GVvPw== From: Ross Zwisler To: linux-kernel@vger.kernel.org Cc: Ross Zwisler , "Tobin C. Harding" , Andrew Morton , Paolo Bonzini , Shuah Khan , Tycho Andersen , kvm@vger.kernel.org, linux-hardening@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-mm@kvack.org, Steven Rostedt , Mukesh Ojha Subject: [PATCH v3 1/3] selftests: use canonical ftrace path Date: Fri, 10 Mar 2023 12:20:48 -0700 Message-Id: <20230310192050.4096886-2-zwisler@kernel.org> X-Mailer: git-send-email 2.40.0.rc1.284.g88254d51c5-goog In-Reply-To: <20230310192050.4096886-1-zwisler@kernel.org> References: <20230310192050.4096886-1-zwisler@kernel.org> MIME-Version: 1.0 X-Rspam-User: X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: AFD9E40012 X-Stat-Signature: basytdpmc9djacuz5qomw837ay76c8yd X-HE-Tag: 1678476065-784536 X-HE-Meta: U2FsdGVkX18WXQ5uqLcWSuUTZQH1pwLzkODLZluMcAvAbIPIofPv0B9/z5eJtrECyccs9Az620ukCBBcZ8n22iEMK65zeTkvm226UnYkorTmSlJs5TBOUqdFqRcumhMv4xjNffwbjTIFR4wDwbtkVT1wukKy9svcE1WUsxz4UjfOSLXRM1QL23mxp6M/J+LnDp696Cnq2Hxd6bE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Y3/V2AMx509gDfBHiQkekSO1ObOLBClIEc+KsMDkNjHtPAKyzDMCFFo4F/slXRYJLLK9C6GJsHwpx7crcY7/BwZyVE9HQORxWxc6V2Izdcl+je/EljGjGdhsaKDR/wHuFVZQEHlEH0S6w7TNLcoi X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Ross Zwisler The canonical location for the tracefs filesystem is at /sys/kernel/tracing. But, from Documentation/trace/ftrace.rst: Before 4.1, all ftrace tracing control files were within the debugfs file system, which is typically located at /sys/kernel/debug/tracing. For backward compatibility, when mounting the debugfs file system, the tracefs file system will be automatically mounted at: /sys/kernel/debug/tracing A few spots in tools/testing/selftests still refer to this older debugfs path, so let's update them to avoid confusion. Reviewed-by: Steven Rostedt (Google) Reviewed-by: Mukesh Ojha Signed-off-by: Ross Zwisler --- tools/testing/selftests/mm/protection_keys.c | 4 ++-- tools/testing/selftests/user_events/dyn_test.c | 2 +- tools/testing/selftests/user_events/ftrace_test.c | 10 +++++----- tools/testing/selftests/user_events/perf_test.c | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/testing/selftests/mm/protection_keys.c b/tools/testing/selftests/mm/protection_keys.c index 95f403a0c46d..0381c34fdd56 100644 --- a/tools/testing/selftests/mm/protection_keys.c +++ b/tools/testing/selftests/mm/protection_keys.c @@ -98,7 +98,7 @@ int tracing_root_ok(void) void tracing_on(void) { #if CONTROL_TRACING > 0 -#define TRACEDIR "/sys/kernel/debug/tracing" +#define TRACEDIR "/sys/kernel/tracing" char pidstr[32]; if (!tracing_root_ok()) @@ -124,7 +124,7 @@ void tracing_off(void) #if CONTROL_TRACING > 0 if (!tracing_root_ok()) return; - cat_into_file("0", "/sys/kernel/debug/tracing/tracing_on"); + cat_into_file("0", "/sys/kernel/tracing/tracing_on"); #endif } diff --git a/tools/testing/selftests/user_events/dyn_test.c b/tools/testing/selftests/user_events/dyn_test.c index d6265d14cd51..8879a7b04c6a 100644 --- a/tools/testing/selftests/user_events/dyn_test.c +++ b/tools/testing/selftests/user_events/dyn_test.c @@ -16,7 +16,7 @@ #include "../kselftest_harness.h" -const char *dyn_file = "/sys/kernel/debug/tracing/dynamic_events"; +const char *dyn_file = "/sys/kernel/tracing/dynamic_events"; const char *clear = "!u:__test_event"; static int Append(const char *value) diff --git a/tools/testing/selftests/user_events/ftrace_test.c b/tools/testing/selftests/user_events/ftrace_test.c index 404a2713dcae..a0b2c96eb252 100644 --- a/tools/testing/selftests/user_events/ftrace_test.c +++ b/tools/testing/selftests/user_events/ftrace_test.c @@ -16,11 +16,11 @@ #include "../kselftest_harness.h" -const char *data_file = "/sys/kernel/debug/tracing/user_events_data"; -const char *status_file = "/sys/kernel/debug/tracing/user_events_status"; -const char *enable_file = "/sys/kernel/debug/tracing/events/user_events/__test_event/enable"; -const char *trace_file = "/sys/kernel/debug/tracing/trace"; -const char *fmt_file = "/sys/kernel/debug/tracing/events/user_events/__test_event/format"; +const char *data_file = "/sys/kernel/tracing/user_events_data"; +const char *status_file = "/sys/kernel/tracing/user_events_status"; +const char *enable_file = "/sys/kernel/tracing/events/user_events/__test_event/enable"; +const char *trace_file = "/sys/kernel/tracing/trace"; +const char *fmt_file = "/sys/kernel/tracing/events/user_events/__test_event/format"; static inline int status_check(char *status_page, int status_bit) { diff --git a/tools/testing/selftests/user_events/perf_test.c b/tools/testing/selftests/user_events/perf_test.c index 8b4c7879d5a7..31505642aa9b 100644 --- a/tools/testing/selftests/user_events/perf_test.c +++ b/tools/testing/selftests/user_events/perf_test.c @@ -18,10 +18,10 @@ #include "../kselftest_harness.h" -const char *data_file = "/sys/kernel/debug/tracing/user_events_data"; -const char *status_file = "/sys/kernel/debug/tracing/user_events_status"; -const char *id_file = "/sys/kernel/debug/tracing/events/user_events/__test_event/id"; -const char *fmt_file = "/sys/kernel/debug/tracing/events/user_events/__test_event/format"; +const char *data_file = "/sys/kernel/tracing/user_events_data"; +const char *status_file = "/sys/kernel/tracing/user_events_status"; +const char *id_file = "/sys/kernel/tracing/events/user_events/__test_event/id"; +const char *fmt_file = "/sys/kernel/tracing/events/user_events/__test_event/format"; struct event { __u32 index;