diff mbox series

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

Message ID 20240503203712.67724-1-jkacur@redhat.com
State New
Headers show
Series rteval: stress-ng: Use inherited method to set exclusive module | expand

Commit Message

John Kacur May 3, 2024, 8:37 p.m. UTC
Add the method set_exclusive() in the rtevalModuleProtype and use it in
stress-ng instead of setting the variable directly

Signed-off-by: John Kacur <jkacur@redhat.com>
---
 rteval/modules/__init__.py       | 5 +++++
 rteval/modules/loads/stressng.py | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py
index cdb0e56f0c63..4330a839db6f 100644
--- a/rteval/modules/__init__.py
+++ b/rteval/modules/__init__.py
@@ -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
diff --git a/rteval/modules/loads/stressng.py b/rteval/modules/loads/stressng.py
index cbcf6b74c1c2..4f6abfb5eabd 100644
--- a/rteval/modules/loads/stressng.py
+++ b/rteval/modules/loads/stressng.py
@@ -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 "