Skip to content

Commit

Permalink
Incorporated review suggestions
Browse files Browse the repository at this point in the history
Test-tag: pr test_io_sys_admin test_largefilecount test_smallfilecount

Signed-off-by: Saurabh Tandan <saurabh.tandan@intel.com>
  • Loading branch information
saurabhtandan committed Aug 5, 2024
1 parent a66bdbd commit 9afa882
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/tests/ftest/util/file_count_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
SPDX-License-Identifier: BSD-2-Clause-Patent
"""
import os

from avocado.core.exceptions import TestFail
from ior_test_base import IorTestBase
from mdtest_test_base import MdtestBase
from oclass_utils import extract_redundancy_factor

import os

class FileCountTestBase(IorTestBase, MdtestBase):
"""Test class Description: Runs IOR and MDTEST to create specified number of files.
Expand All @@ -20,8 +21,10 @@ def add_containers(self, file_oclass=None, dir_oclass=None):
"""Create a list of containers that the various jobs use for storage.
Args:
file_oclass: file object class of container
dir_oclass: dir object class of container
file_oclass (str, optional): file object class of container.
Defaults to None.
dir_oclass (str, optional): dir object class of container.
Defaults to None.
"""
Expand All @@ -43,9 +46,11 @@ def add_containers(self, file_oclass=None, dir_oclass=None):

def get_diroclass(self, rd_fac):
"""
rd_fac: redundancy factor
Args
rd_fac (int): redundancy factor
Returns: value for dir_oclass
Returns:
str: value for dir_oclass
"""

if rd_fac >= 2:
Expand Down Expand Up @@ -83,8 +88,7 @@ def run_file_count(self):
self.mdtest_cmd.test_dir.update("/")
if self.mdtest_cmd.api.value in ['DFS', 'POSIX']:
for oclass in mdtest_oclass:
self.log.info("=======>>>Starting MDTEST with %s and %s", api,
oclass)
self.log.info("=======>>>Starting MDTEST with %s and %s", api, oclass)
self.mdtest_cmd.dfs_oclass.update(oclass)
rd_fac = extract_redundancy_factor(oclass)
dir_oclass = self.get_diroclass(rd_fac)
Expand Down

0 comments on commit 9afa882

Please sign in to comment.