Linux-rt-users archive mirror
 help / color / mirror / Atom feed
From: John Kacur <jkacur@redhat.com>
To: RT <linux-rt-users@vger.kernel.org>
Cc: Clark Williams <williams@redhat.com>, John Kacur <jkacur@redhat.com>
Subject: [PATCH] rteval: stress-ng: Use inherited method to set exclusive module
Date: Fri,  3 May 2024 16:37:12 -0400	[thread overview]
Message-ID: <20240503203712.67724-1-jkacur@redhat.com> (raw)

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 --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 "
-- 
2.44.0


                 reply	other threads:[~2024-05-03 20:37 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240503203712.67724-1-jkacur@redhat.com \
    --to=jkacur@redhat.com \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).