Skip to content

Commit

Permalink
issue-2831: dump iolog for fio_index mount_kikimr tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Deb Natkh committed Jan 13, 2025
1 parent bec3ec0 commit 427c1a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build/ext_mapping.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"5074323334": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/rootfs-compressed.img",
"4399070549": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/blockstore-plugin-stable-23-1.tar.gz",
"3240550068": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/blockstore-plugin-stable-22-2.tar.gz",
"2326530962": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/fio-static.tgz",
"2326530962": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/fio-3.38-static.tgz",
"4449551218": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/qemu-static.tgz",
"3307630510": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/rootfs.img",
"4556399018": "https://storage.eu-north1.nebius.cloud/nbs-oss-resources/virtiofs-server",
Expand Down
3 changes: 2 additions & 1 deletion cloud/filestore/tests/fio_index/mount-kikimr-test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ def test_fio(name):
mount_dir = get_filestore_mount_path()
dir_name = fio.get_dir_name(mount_dir, name)

fio.run_index_test(dir_name, TESTS[name], fail_on_errors=True)
# TODO(#2831): remove this debug information
fio.run_index_test(dir_name, TESTS[name], fail_on_errors=True, verbose=True)
13 changes: 10 additions & 3 deletions cloud/storage/core/tools/testing/fio/lib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,19 @@ def get_fio_cmd(self, fio_bin, file_name):
cmd += ["--filename", file_name]
return cmd

def get_index_fio_cmd(self, fio_bin, directory):
def get_index_fio_cmd(self, fio_bin, directory, verbose=False):
cmd = self.get_common_fio_cmd(fio_bin)
cmd += [
"--directory", directory,
"--numjobs", str(self.numjobs)
]
if verbose:
cmd += [
"--write_iolog",
os.path.join(common.output_path(), f"{self.name}.iolog"),
"--log_issue_time",
"1",
]
if self.fsync > 0:
cmd += ["--fsync", str(self.fsync)]
if self.fdatasync > 0:
Expand Down Expand Up @@ -311,14 +318,14 @@ def run_test(file_name, test, fail_on_errors=False):
return _execute_command(cmd, fail_on_errors)


def run_index_test(directory, test, fail_on_errors=False):
def run_index_test(directory, test, fail_on_errors=False, verbose=False):
# fio lays out the test file using the job blocksize, which may exhaust the
# run time limit, so do it ourselves
logger.info("laying out files in directory " + directory)
_lay_out_files(directory, test.name, test.numjobs, test.size)
logger.info("laid out")

fio_bin = _get_fio_bin()
cmd = test.get_index_fio_cmd(fio_bin, directory)
cmd = test.get_index_fio_cmd(fio_bin, directory, verbose)

return _execute_command(cmd, fail_on_errors)

0 comments on commit 427c1a5

Please sign in to comment.