Merge pull request #195 from rafalste/flush_handling

tests: Improve flush handling during cache mode change
This commit is contained in:
Michał Mielewczyk
2019-11-25 16:53:51 +01:00
committed by GitHub
2 changed files with 6 additions and 4 deletions

View File

@@ -167,10 +167,12 @@ def print_statistics(cache_id: int, core_id: int = None, per_io_class: bool = Fa
def set_cache_mode(cache_mode: CacheMode, cache_id: int,
flush: bool = True, shortcut: bool = False):
flush=None, shortcut: bool = False):
flush_cache = None
if cache_mode in [CacheMode.WB, CacheMode.WO]:
flush_cache = "yes" if flush else "no"
if flush is True:
flush_cache = "yes"
elif flush is False:
flush_cache = "no"
output = TestRun.executor.run(
set_cache_mode_cmd(cache_mode=cache_mode.name.lower(), cache_id=str(cache_id),