Merge pull request #723 from jfckm/standby-io-tests

Tests for standby I/O
This commit is contained in:
Michał Mielewczyk
2022-06-02 09:17:43 +02:00
committed by GitHub
3 changed files with 102 additions and 4 deletions

View File

@@ -124,9 +124,9 @@ class Rio:
def run(self):
iogen = IoGen(
(self.jobspec.offset, self.jobspec.size),
(self.jobspec.offset, self.jobspec.size - self.jobspec.offset),
self.jobspec.bs,
self.jobspec.randseed,
self.jobspec.randseed + hash(self.name),
self.jobspec.readwrite.is_random(),
self.jobspec.randommap,
)
@@ -150,7 +150,7 @@ class Rio:
while not self.should_finish():
with self.qd_condition:
self.qd_condition.wait_for(lambda: self.qd <= self.jobspec.qd)
self.qd_condition.wait_for(lambda: self.qd < self.jobspec.qd)
data = Data(self.jobspec.bs) # TODO pattern and verify
io = self.jobspec.target.new_io(
@@ -190,6 +190,10 @@ class Rio:
self.global_jobspec.randommap = False
return self
def randseed(self, seed):
self.global_jobspec.randseed = seed
return self
def bs(self, bs: Size):
self.global_jobspec.bs = bs
return self