fsperf: get the running section in the setup
PATCH 2/3 fsperf: get the running section in the setup
In reply to a message not in the archiveIn 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.
Signed-off-by Anand Jain <[email protected]>
--- 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
@@ -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
@@ -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
@@ -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
@@ -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