diff mbox series

[16/34] check: deprecate using process sessions to isolate test instances

Message ID 173933094600.1758477.11291016624208986202.stgit@frogsfrogsfrogs (mailing list archive)
State New
Headers show
Series [01/34] generic/476: fix fsstress process management | expand

Commit Message

Darrick J. Wong Feb. 12, 2025, 3:34 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

As I've noted elsewhere, the use of process session ids to "isolate"
test instances from killing each other is kind of hacky and creates
other weird side effects.  I'd rather everyone use the new code that
runs everything in proper isolation with private pid and mount
namespaces, but I don't know how many people this would break were it a
hard dependency.

Deprecate the process session handling immediately with a warning that
we're going to rip it out in a year.

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
---
 check |   11 +++++++++++
 1 file changed, 11 insertions(+)
diff mbox series

Patch

diff --git a/check b/check
index 8834c96772bde8..e79fefc4168c06 100755
--- a/check
+++ b/check
@@ -692,6 +692,15 @@  function _adjust_oom_score() {
 }
 _adjust_oom_score -500
 
+warn_deprecated_sessionid()
+{
+	if [ -z "$WARNED_DEPRECATED_SESSIONID" ]; then
+		echo "WARNING: Running fstests without private pid/mount namespace"
+		echo "support is deprecated and will be removed in February 2026."
+		WARNED_DEPRECATED_SESSIONID=1
+	fi
+}
+
 # ...and make the tests themselves somewhat more attractive to it, so that if
 # the system runs out of memory it'll be the test that gets killed and not the
 # test framework.  The test is run in a separate process without any of our
@@ -891,6 +900,8 @@  function run_section()
 	seqres="$check"
 	_check_test_fs
 
+	test -n "$HAVE_PRIVATENS" || warn_deprecated_sessionid
+
 	loop_status=()	# track rerun-on-failure state
 	local tc_status ix
 	local -a _list=( $list )