Skip to contentSkip to conversation

fsperf: get the running section in the setup

PATCH In review Anand Jain 1 participant 1 message Nov 12, 2021 1 message not in the archive Btrfs file system

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

Anand Jain

author
#1 lore raw

PATCH 2/3 fsperf: get the running section in the setup

In preparation to support readpolicy in the config file, get the section as an argument in the function setup(). It helps to verify the given readpolicy.

---
 src/PerfTest.py          | 2 +-
 src/fsperf.py            | 2 +-
 tests/randwrite-2xram.py | 2 +-
 tests/untar-firefox.py   | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)
src/PerfTest.py +1 -1
index a47dd4985c3d..f084a92121e3 100644
@@ -9,7 +9,7 @@ class PerfTest():
     command = ""
     need_remount_after_setup = False
 
-    def setup(self, config):
+    def setup(self, config, section):
         pass
     def test(self, run, config, results):
         pass
src/fsperf.py +1 -1
index 99d8e9e0e43f..a26d95b8b5f4 100644
@@ -20,7 +20,7 @@ def run_test(args, session, config, section, test):
         mkfs(config, section)
         mount(config, section)
         try:
-            test.setup(config)
+            test.setup(config, section)
             if (test.need_remount_after_setup and
                 config.has_option(section, 'mount')):
                 run_command("umount {}".format(config.get('main', 'directory')))
tests/randwrite-2xram.py +1 -1
index 25fc94e51dde..dfaa97236727 100644
@@ -9,6 +9,6 @@ class Randwrite2xRam(FioTest):
                "--size=SIZE --numjobs=4 --bs=4k --fsync_on_close=0 "
                "--end_fsync=0")
 
-    def setup(self, config):
+    def setup(self, config, section):
         mem = psutil.virtual_memory()
         self.command = self.command.replace('SIZE', str(mem.total*2))
tests/untar-firefox.py +1 -1
index 5bc1923db72e..b5dd7ab8ecb5 100644
@@ -5,5 +5,5 @@ class UntarFirefox(TimeTest):
     name = "untarfirefox"
     command = "tar -xf firefox-87.0b5.source.tar.xz -C DIRECTORY"
 
-    def setup(self, config):
+    def setup(self, config, section):
         utils.run_command("wget -nc https://archive.mozilla.org/pub/firefox/releases/87.0b5/source/firefox-87.0b5.source.tar.xz")
Signature · 1 line
2.33.1