Add io_direction
to random params for IoClass
Signed-off-by: Daniel Madej <daniel.madej@huawei.com>
This commit is contained in:
parent
1445982b91
commit
4cc7a74534
@ -185,6 +185,9 @@ class IoClass:
|
|||||||
elif rule in ["extension", "process_name", "file_name_prefix"]:
|
elif rule in ["extension", "process_name", "file_name_prefix"]:
|
||||||
allowed_chars = string.ascii_letters + string.digits
|
allowed_chars = string.ascii_letters + string.digits
|
||||||
rule += f":{''.join(random.choices(allowed_chars, k=random.randint(1, 10)))}"
|
rule += f":{''.join(random.choices(allowed_chars, k=random.randint(1, 10)))}"
|
||||||
|
elif rule == "io_direction":
|
||||||
|
direction = random.choice(["read", "write"])
|
||||||
|
rule += f":{direction}"
|
||||||
if random.randrange(2):
|
if random.randrange(2):
|
||||||
rule += "&done"
|
rule += "&done"
|
||||||
return rule
|
return rule
|
||||||
|
Loading…
Reference in New Issue
Block a user