Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAOS-16446 test: HDF5-VOL test - Set object class and container prope… #15004

Merged
merged 6 commits into from
Sep 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions src/tests/ftest/util/file_count_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class FileCountTestBase(IorTestBase, MdtestBase):
:avocado: recursive
"""

def add_containers(self, file_oclass=None, dir_oclass=None):
"""Create a list of containers that the various jobs use for storage.
def get_file_write_container(self, file_oclass=None, dir_oclass=None):
"""Create a container, set oclass, dir_oclass, and add rd_fac property based on oclass.

Args:
file_oclass (str, optional): file object class of container.
Defaults to None.
dir_oclass (str, optional): dir object class of container.
Defaults to None.
file_oclass (str, optional): file object class of container. Defaults to None.
dir_oclass (str, optional): dir object class of container. Defaults to None.

Returns:
TestContainer: Created container with oclass, dir_oclass, and rd_fac set.

"""
# Create a container and add it to the overall list of containers
Expand Down Expand Up @@ -92,7 +92,7 @@ def run_file_count(self):
rd_fac = extract_redundancy_factor(oclass)
dir_oclass = self.get_diroclass(rd_fac)
self.mdtest_cmd.dfs_dir_oclass.update(dir_oclass)
self.container = self.add_containers(oclass, dir_oclass)
self.container = self.get_file_write_container(oclass, dir_oclass)
try:
self.processes = mdtest_np
self.ppn = mdtest_ppn
Expand All @@ -111,14 +111,27 @@ def run_file_count(self):
# run ior
self.log.info("=======>>>Starting IOR with %s and %s", api, oclass)
self.ior_cmd.dfs_oclass.update(oclass)
self.container = self.add_containers(oclass)
self.container = self.get_file_write_container(oclass)
self.update_ior_cmd_with_pool(False)
try:
self.processes = ior_np
self.ppn = ior_ppn
if api == 'HDF5-VOL':
# Format the container properties so that it works with HDF5-VOL env var.
# Each entry:value pair needs to be separated by a semicolon. Since we're
# using this in the mpirun command, semicolon would indicate the end of the
# command, so quote the whole thing.
cont_props = self.container.properties.value
cont_props_hdf5_vol = '"' + cont_props.replace(",", ";") + '"'
self.log.info("cont_props_hdf5_vol = %s", cont_props_hdf5_vol)
env = self.ior_cmd.env.copy()
env.update({
"HDF5_DAOS_OBJ_CLASS": oclass,
"HDF5_DAOS_FILE_PROP": cont_props_hdf5_vol
})
self.ior_cmd.api.update('HDF5')
self.run_ior_with_pool(create_pool=False, plugin_path=hdf5_plugin_path)
self.run_ior_with_pool(
create_pool=False, plugin_path=hdf5_plugin_path, env=env)
elif self.ior_cmd.api.value == 'POSIX':
self.run_ior_with_pool(create_pool=False, intercept=intercept)
else:
Expand Down
Loading