[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <173625186741.1383744.16707876180798573039.stgit@devnote2>
Date: Tue, 7 Jan 2025 21:11:07 +0900
From: "Masami Hiramatsu (Google)" <mhiramat@...nel.org>
To: Steven Rostedt <rostedt@...dmis.org>,
Shuah Khan <shuah@...nel.org>
Cc: linux-kernel@...r.kernel.org,
linux-trace-kernel@...r.kernel.org,
mhiramat@...nel.org,
linux-kselftest@...r.kernel.org
Subject: [PATCH 1/2] selftests/ftrace: Fix to use remount when testing mount GID option
From: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Fix mount_options.tc to use remount option to mount the tracefs.
Since the current implementation does not umount the tracefs,
this test always fails because of -EBUSY error.
Using remount option will allow us to change the mount option.
Fixes: 8b55572e5180 ("tracing/selftests: Add tracefs mount options test")
Signed-off-by: Masami Hiramatsu (Google) <mhiramat@...nel.org>
Cc: stable@...r.kernel.org
---
.../ftrace/test.d/00basic/mount_options.tc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/testing/selftests/ftrace/test.d/00basic/mount_options.tc b/tools/testing/selftests/ftrace/test.d/00basic/mount_options.tc
index 35e8d47d6072..8a7ce647a60d 100644
--- a/tools/testing/selftests/ftrace/test.d/00basic/mount_options.tc
+++ b/tools/testing/selftests/ftrace/test.d/00basic/mount_options.tc
@@ -15,11 +15,11 @@ find_alternate_gid() {
tac /etc/group | grep -v ":$original_gid:" | head -1 | cut -d: -f3
}
-mount_tracefs_with_options() {
+remount_tracefs_with_options() {
local mount_point="$1"
local options="$2"
- mount -t tracefs -o "$options" nodev "$mount_point"
+ mount -t tracefs -o "remount,$options" nodev "$mount_point"
setup
}
@@ -81,7 +81,7 @@ test_gid_mount_option() {
# Unmount existing tracefs instance and mount with new GID
unmount_tracefs "$mount_point"
- mount_tracefs_with_options "$mount_point" "$new_options"
+ remount_tracefs_with_options "$mount_point" "$new_options"
check_gid "$mount_point" "$other_group"
@@ -92,7 +92,7 @@ test_gid_mount_option() {
# Unmount and remount with the original GID
unmount_tracefs "$mount_point"
- mount_tracefs_with_options "$mount_point" "$mount_options"
+ remount_tracefs_with_options "$mount_point" "$mount_options"
check_gid "$mount_point" "$original_group"
}
Powered by blists - more mailing lists