From d9ce2db1a34b3ce9f13c0a2bfbbf6a8d261dfaf6 Mon Sep 17 00:00:00 2001 From: Andrei Chekun Date: Tue, 3 Feb 2026 11:25:50 +0100 Subject: [PATCH] test.py: remove setsid from the framework With previous architecture, scylla servers were handled by test.py and if pytest fails, test.py was responsible for stopping scylla processes. Now with only pytest handling, there is no such mechanism, that's why I'm removing the setsid, so when the parent pytest process closes it will automatically close all child including any started process during testing. This will allow to not leave any scylla process in case pytest was killed. --- test/pylib/resource_gather.py | 3 +-- test/pylib/scylla_cluster.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/test/pylib/resource_gather.py b/test/pylib/resource_gather.py index efa6759083..09aee0eba7 100644 --- a/test/pylib/resource_gather.py +++ b/test/pylib/resource_gather.py @@ -119,7 +119,7 @@ class ResourceGather(ABC): pass def put_process_to_cgroup(self) -> None: - os.setsid() + pass def get_test_metrics(self) -> Metric: pass @@ -197,7 +197,6 @@ class ResourceGatherOn(ResourceGather): self.sqlite_writer.write_row(metrics, METRICS_TABLE) def put_process_to_cgroup(self) -> None: - super().put_process_to_cgroup() try: pid = os.getpid() with open(self.cgroup_path / 'cgroup.procs', "a") as cgroup: diff --git a/test/pylib/scylla_cluster.py b/test/pylib/scylla_cluster.py index 429a5bc866..d6d115541e 100644 --- a/test/pylib/scylla_cluster.py +++ b/test/pylib/scylla_cluster.py @@ -823,7 +823,6 @@ class ScyllaServer: stderr=self.log_file, stdout=self.log_file, env=env, - preexec_fn=os.setsid, ) if expected_server_up_state == ServerUpState.PROCESS_STARTED: