Skip to contentSkip to conversation

rteval: stress-ng: Use inherited method to set exclusive module

PATCH New John Kacur 1 participant 1 message May 3, 2024

lore
Share & tools
lore

John Kacur

author
#0 lore raw

PATCH 1/1 rteval: stress-ng: Use inherited method to set exclusive module

Add the method set_exclusive() in the rtevalModuleProtype and use it in stress-ng instead of setting the variable directly

---
 rteval/modules/__init__.py       | 5 +++++
 rteval/modules/loads/stressng.py | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
rteval/modules/__init__.py +5 -0
index cdb0e56f0c63..4330a839db6f 100644
@@ -62,6 +62,11 @@ class rtevalModulePrototype(threading.Thread):
         return self._exclusive
 
 
+    def set_exclusive(self):
+        """ Sets This module to run alone """
+        self._exclusive = True
+
+
     def set_donotrun(self):
         """ set a module's donotrun field to True """
         self._donotrun = True
rteval/modules/loads/stressng.py +1 -1
index cbcf6b74c1c2..4f6abfb5eabd 100644
@@ -31,7 +31,7 @@ class Stressng(CommandLineLoad):
         else:
             self._donotrun = True
         # When this module runs, other load modules should not
-        self._exclusive = True
+        self.set_exclusive()
 
     def _WorkloadSetup(self):
         " Since there is nothing to build, we don't need to do anything here "
Signature · 1 line
2.44.0