From patchwork Mon Jan 30 18:19:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ross Zwisler X-Patchwork-Id: 13121574 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 BBE1DC54EAA for ; Mon, 30 Jan 2023 18:19:48 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 4EAA16B007D; Mon, 30 Jan 2023 13:19:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 473EA6B007E; Mon, 30 Jan 2023 13:19:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2EDA26B0080; Mon, 30 Jan 2023 13:19:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 191016B007D for ; Mon, 30 Jan 2023 13:19:48 -0500 (EST) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id E99D2140A7A for ; Mon, 30 Jan 2023 18:19:47 +0000 (UTC) X-FDA: 80412278814.28.E2B9AD3 Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) by imf08.hostedemail.com (Postfix) with ESMTP id 24736160004 for ; Mon, 30 Jan 2023 18:19:45 +0000 (UTC) Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=Mq8KtW55; spf=pass (imf08.hostedemail.com: domain of zwisler@chromium.org designates 209.85.166.170 as permitted sender) smtp.mailfrom=zwisler@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1675102786; 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=tgFT+IL5bcCj7J23e5lu6CYNi7LTiunoNwjje3GvFYg=; b=dsWhkmSPFVW0mYLwivDlQlouTZpnq0kdA2IksRRErmv6eQRd2d8naJRZtXLiWY3iUCnIoz PnG9Qy26Q4z3G2J2+b8NlzxCQyL3ttT04IZfqJVUumQnv0z/BHo1vWx5Rv4KWrXEMa/0if AhAUbwPLXyezsoykGVh5gcmLyJv2dD0= ARC-Authentication-Results: i=1; imf08.hostedemail.com; dkim=pass header.d=chromium.org header.s=google header.b=Mq8KtW55; spf=pass (imf08.hostedemail.com: domain of zwisler@chromium.org designates 209.85.166.170 as permitted sender) smtp.mailfrom=zwisler@chromium.org; dmarc=pass (policy=none) header.from=chromium.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1675102786; a=rsa-sha256; cv=none; b=A8DyLyd4tIFpQKpNKfP6piiBrJ2/e9z0ccjomkSj+AeJVegzyLJ+IRg2QUe6WJhPSFXOBH Nwxkl/NEHgaTw5K1T5rtX06GsnURzpdejwGLNn740SlW6ZtjbesN7VijuMplm/VYqIhvuZ d0kdOFG9O2YRy3HLGMGoLJa0Y3bwKH8= Received: by mail-il1-f170.google.com with SMTP id m15so855996ilh.9 for ; Mon, 30 Jan 2023 10:19:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=tgFT+IL5bcCj7J23e5lu6CYNi7LTiunoNwjje3GvFYg=; b=Mq8KtW55EljioiViKDgF8PzaF6ZoQGnyoe2RRses0f4mgf5MIpiCriGT+IifaZfwon X9gCElvVuCs7mc8cR3RJwpKr2/rhpjPfH3EMST7OBev+p4E1ZR9kPbKZSLFahZXq2u5O J2miOwkGMz+dINzvWVyw1PJ51UBnR2WUJXLvs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tgFT+IL5bcCj7J23e5lu6CYNi7LTiunoNwjje3GvFYg=; b=MDGWyUYFY7Um341kRTnb/JyLQBYd6xWP3LKVzCh31cV7ZNzeLWtSnyaAtyEZu+Li9s nZdFARMpm28enRTBGnrJpzSUPTFZWKhQzzhe8UaLHgG1Tl6iXKCkOq7nk1OrHzFmxVrY BC6+O5GhK4lXOipKEQOhUn9/JR5cXgkfl7il7moN9n5uL0PowzDfkEgsYENCDHpAf9EH x+A4rBNLbRopxXBND7hzley9MghGJtafmzcKphsbowedaX6mvnNYmXgbcLuavbXhQnky pTSMjqiF2W7t8V867u8HZVOpU40/JTnKsz7OubTCCDFHRvUdlH+XD4gewnFzZ8Y8nYc0 Yk8A== X-Gm-Message-State: AO0yUKWet35Z+6SAukYAdzYy6ELfAtHNiGsLDPCrZDEFVhp8OOFrwdzf xJovMB4rhOJdQWDq8C540E04PA== X-Google-Smtp-Source: AK7set8Yf1vmtP2krbFokO0Bn2Jo9liICFpI/GrHXPPM8ng0Ggp+ndGSIwsJUjW/xnrBNESNxA7g7w== X-Received: by 2002:a05:6e02:1886:b0:310:a0a3:f614 with SMTP id o6-20020a056e02188600b00310a0a3f614mr19626648ilu.13.1675102785344; Mon, 30 Jan 2023 10:19:45 -0800 (PST) Received: from ravnica.bld.corp.google.com ([2620:15c:183:200:fc8a:dd2f:5914:df14]) by smtp.gmail.com with ESMTPSA id o16-20020a056e02115000b002f139ba4135sm4189801ill.86.2023.01.30.10.19.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Jan 2023 10:19:45 -0800 (PST) From: Ross Zwisler X-Google-Original-From: Ross Zwisler To: linux-kernel@vger.kernel.org Cc: Ross Zwisler , Shuah Khan , Steven Rostedt , linux-trace-kernel@vger.kernel.org, Andrew Morton , linux-kselftest@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH 6/9] selftests: use canonical ftrace path Date: Mon, 30 Jan 2023 11:19:12 -0700 Message-Id: <20230130181915.1113313-7-zwisler@google.com> X-Mailer: git-send-email 2.39.1.456.gfc5497dd1b-goog In-Reply-To: <20230130181915.1113313-1-zwisler@google.com> References: <20230130181915.1113313-1-zwisler@google.com> MIME-Version: 1.0 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 24736160004 X-Stat-Signature: qq3kcmghr1rk5udkqepq3iqb7yaj66jr X-Rspam-User: X-HE-Tag: 1675102785-303290 X-HE-Meta: U2FsdGVkX1/WZm3/FtdRhciMqboUt3Il1zKUbxqSS3Enl5lYsLN2dWAfF/8PjPzXejpOUoNmCLEyhELhHiwfsH7pOzTGod4ugiKehoZK6y9vBsA9BC+2Ik7aZLX1i+AryBKdZNPbkYPoLqyMX8cp0E/U9/9av6jRaUM8QiMzuJw+QxyOYeGa1dfUBKar7JquUd4ckIoJ2HpS6o22qvAZ6kGNQT4R/gTAyxZSxp9U7tS0Gk7E2K0Sfwkg+BtSJ25tWLel9pXxXtjkRlus8qr2hpp1VXa8Bfh813dKWAbA6kqO9zPqxejCVRKInSJemVIydkmj/5F02wnTFnZHBX5YZ64TzPPm6O9i1GWfc1tMdeYGTeJOB2tbFuIrxjOePojOcJOSk0QELmcHVMJl6NMHcvjFBh93xJK1fu3sen7XPz4ecxHiLREYL1L7tvYvTrjGFJExqcR/MzfTAWdCafplrQ8kR3gGXDUtLOt1sYeCNQsvV4VqVTveyonBAIttUVLgLR2XuSl4TOjovpK/PT3BgS3lzx/NlcOpZlNOmME/1wnF9Nx2AXbZKD5GV1hWMIi/fw2cFf+ZNLiYUnJBaljkG/YnL8K+d/orhEauHv4xjhtd5/DnjhQxwFEobpFj2Hb2eze4VZeNoOtQ48gpkCnWBsfs4rkgWJNFhkLhFeuHnfSromzv4Drvy89qmLojUsezf48Noa9hhc7OzxNmQnCh9NLdG5nwpFCDlxKGjt9JN1IFlF20UzYg6hGsCnQhYEz/xcfrsg5GHFKGAV2WjSQgvWkAM9RSQOJIpsInVxQ2jbCMwpdHMoY34d89ixJTBLA2bWQZfu2M+maW3q7zWWeo8+zRvdhnnN9SIptSlrDJRDURVh9MEEVAPLcN0ujgk35JgNpj7fMH2Yssh2IOZJbdUkx1VWMN3RNN8udYvvsNgcB8kxeAd979+3L27Kw4vWlts5r4oE8fQhRP9bpRSjG dYK9hIBO 5hO74Mu9sKnnpfXGMFzQn9JV0+rWSB3eaBz6ehMFaU58Yc8ovg9msCXkzj8N4SgfzxBuOozLpU341dv+omamrpozpvbdFlBxasgm2Vxkv4n4JpYWXH0OY8Q3SjNIDkwU1LpEd4zerYvWdtlpLAjqf80bS8lvGiWo96i35Njkutx9Gx8Q1jU4qwDRCgAMlHYpbG5GnDtSnStXmtNnnvaZOlul7fGLozZOC8ZYPyPFAVQnDu6MV+qUp8Mk/AmgNFxu03ecgweByv3oALLVkSRf8z/qG6607y3wMG05k19iaIfMGIJi3ysPwyVW33X4W92/dGbG5tmqgHWUyIqs= 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: 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. Signed-off-by: Ross Zwisler --- 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 ++++---- tools/testing/selftests/vm/protection_keys.c | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) 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; diff --git a/tools/testing/selftests/vm/protection_keys.c b/tools/testing/selftests/vm/protection_keys.c index 291bc1e07842..0d421015fbc1 100644 --- a/tools/testing/selftests/vm/protection_keys.c +++ b/tools/testing/selftests/vm/protection_keys.c @@ -97,7 +97,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()) @@ -123,7 +123,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 }