Example #1
0
 def __init__(self):
   assert(fd_begin > 3)
   # Map from SFdNum to concrete FD number
   self.fds = testgen.Interpreter(fs_module.SFdNum, range(fd_begin, fd_end))
   # Map from SVa to concrete virtual address
   self.vas = testgen.Interpreter(
     fs_module.SVa, ((va_base + i * 4096) for i in range(va_len)))
Example #2
0
 def __init__(self, fs, sar, constraint):
   self.fs = fs
   self.sar = sar
   self.constraint = constraint
   # Map from uninterpreted path names to concrete file names
   self.filenames = testgen.Interpreter(fs_module.SFn, all_filenames)
   # Map from SInum to concrete Inode object
   self.inums = testgen.Interpreter(
     fs_module.SInum, map(Inode, range(0, 6)))
   # Map from SDataVal to DataVal
   self.datavals = testgen.Interpreter(fs_module.SDataVal, all_datavals,
                                       enumerate=False)
   # Map from uninterpreted pipe IDs to reader FDs (writers are +1)
   self.pipes = testgen.Interpreter(
     fs_module.SPipeId, range(pipe_begin, pipe_end, 2))
   self.procs = testgen.DynamicDict(iter(PerProc, None))
Example #3
0
 def __init__(self, num):
   if num is not None:
     self.fname = '__i%d' % num
   # Map from SOffset (in datavals) to physical byte offset
   self.offsets = testgen.Interpreter(
     fs_module.SOffset, lambda off: off * DATAVAL_BYTES)