def passes(out, err): return all( [th.writes(err, '/tmp/new-symlink'), th.writes(err, '/tmp/other-link'), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.mkdirs(err, '/tmp/subdirnew'), th.count_mkdir(err, 1), th.count_writes(err, 0), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.writes(err, '/tmp/barbaz'), th.writes(err, '/tmp/silly-file'), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.reads(err, '/tests/kill-self.sh'), th.writes(err, 'tmp/foo'), th.count_writes(err, 1), th.reads(err, '/tmp/root_symlink'), ])
def passes(out, err): return all([ th.reads(err, '/tests/vforks.test'), th.writes(err, '/tmp.vforks'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/rename-over-symlink.test'), th.writes(err, '/tmp/root_symlink'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.reads(err, '/tests/forks.test'), th.writes(err, '/tmp/subdir1/deepdir/forks'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.mkdirs(err, '/tmp/subdirnew'), th.count_mkdir(err, 1), th.count_writes(err, 0), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/forks.test'), th.writes(err, '/tmp/subdir1/deepdir/forks'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.writes(err, '/tmp/openat'), th.count_mkdir(err, 0), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/fopen.test'), th.writes(err, '/tmp/foo'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/rename.test'), th.writes(err, '/tmp/barbaz'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.writes(err, '/tmp/new-symlink'), th.writes(err, '/tmp/other-link'), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.reads(err, '/tests/long-path.sh'), th.count_writes(err, 80), th.reads(err, '/tmp/root_symlink'), th.writes(err, 'tmp/dirfoo/dirfoo/dirfoo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/dir foo/file .dat'), ])
def passes(out, err): return all([ th.writes(err, '/tmp/subdir1/foo_symlink'), th.writes(err, '/tmp/subdir1/openat'), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.writes(err, '/tmp/barbaz'), th.writes(err, '/tmp/silly-file'), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/broken-symlink.test'), th.writes(err, '/tmp/other-link'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.writes(err, '/tmp/subdir1/foo_symlink'), th.writes(err, '/tmp/subdir1/openat'), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/kill-self.sh'), th.writes(err, 'tmp/foo'), th.count_writes(err, 1), th.reads(err, '/tmp/root_symlink'), ])
def passes(out, err): return all( [th.writes(err, '/tmp/openat'), th.count_mkdir(err, 0), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/truncate.sh'), th.count_writes(err, 2), th.reads(err, '/tmp/root_symlink'), th.writes(err, '/tmp/foo'), th.writes(err, '/tmp/foobar'), ])
def passes_windows(out, err): print('out:\n' + out) print('err:\n' + err) return all([ th.reads(err, r'\tests\pyrename-test.py'), th.writes(err, r'\tmp\hello-final'), th.count_writes(err, 1), ])
def passes_windows(out, err): print('out:\n' + out) print('err:\n' + err) return all( [th.reads(err, r'\tests\pyrename-test.py'), th.writes(err, r'\tmp\hello-final'), th.count_writes(err, 1), ])
def passes(out, err): return all( [th.reads(err, '/tests/truncate.sh'), th.count_writes(err, 2), th.reads(err, '/tmp/root_symlink'), th.writes(err, '/tmp/foo'), th.writes(err, '/tmp/foobar'), ])
def passes_windows(out, err): print('out:\n' + out) print('err:\n' + err) return all([ th.writes(err, r'\tmp\barbaz'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes_windows(out, err): print('out:\n' + out) print('err:\n' + err) return all( [th.writes(err, r'\tmp\barbaz'), th.writes(err, '/tmp/silly-file'), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.reads(err, '/tests/linkat.test'), th.reads(err, '/tests/null.test'), th.writes(err, '/tmp/subdir2/hidden/awesome'), th.mkdirs(err, '/tmp/subdir2/hidden'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes_windows(out, err): print('out:\n' + out) print('err:\n' + err) return all([ th.count_writes(err, 2), th.doesnt_write(err, r'\tmp\subdir2\hello'), th.doesnt_read(err, r'\tmp\subdir2\test'), th.writes(err, r'\tmp\newdir\hello'), th.writes(err, r'\tmp\newdir\test'), ])
def passes(out, err): return all( [th.writes(err, '/tmp/subdirnew/subfile'), th.writes(err, '/tmp/useless'), th.mkdirs(err, '/tmp/subdirnew'), th.mkdirs(err, '/tmp/subdirnew/subsub'), th.count_mkdir(err, 2), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.writes(err, '/tmp/subdirnew/subfile'), th.writes(err, '/tmp/useless'), th.mkdirs(err, '/tmp/subdirnew'), th.mkdirs(err, '/tmp/subdirnew/subsub'), th.count_mkdir(err, 2), th.count_writes(err, 2), th.count_readdir(err, 0), ])
def passes_windows(out, err): print('out:\n' + out) print('err:\n' + err) return all( [th.count_writes(err, 2), th.doesnt_write(err, r'\tmp\subdir2\hello'), th.doesnt_read(err, r'\tmp\subdir2\test'), th.writes(err, r'\tmp\newdir\hello'), th.writes(err, r'\tmp\newdir\test'), ])
def passes_windows(out, err): '''Some day I want this to register th.reads(err, r'\tests\null-test.exe'), but for now we aren't tracking the creation of processes. ''' return all([ th.count_writes(err, 0), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.reads(err, '/tmp/foo'), th.reads(err, '/tmp/subdir1/foo_symlink'), th.writes(err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'), th.mkdirs(err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'), th.mkdirs(err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'), th.mkdirs(err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes_windows(out, err): '''Some day I want this to register th.reads(err, r'\tests\null-test.exe'), but for now we aren't tracking the creation of processes. ''' return all( [th.count_writes(err, 0), th.count_readdir(err, 0), ])
def passes(out, err): """This test illustrates a limitation of how we handle directory renames: we only track changes to files within that directory that we have written to or read from. This means that you cannot take the output of two sequential jobs and use it to find the net change, since the second job may rename files written to in the first job. In the context of fac, I don't see this being a problem. A complete fix would involve tracking deletions as well as writes. """ return all( [th.count_writes(err, 2), th.doesnt_write(err, '/tmp/subdir2/hello'), th.doesnt_read(err, '/tmp/subdir2/test'), th.writes(err, '/tmp/newdir/hello'), th.writes(err, '/tmp/newdir/test'), ])
def passes(out, err): """This test illustrates a limitation of how we handle directory renames: we only track changes to files within that directory that we have written to or read from. This means that you cannot take the output of two sequential jobs and use it to find the net change, since the second job may rename files written to in the first job. In the context of fac, I don't see this being a problem. A complete fix would involve tracking deletions as well as writes. """ return all([ th.count_writes(err, 2), th.doesnt_write(err, '/tmp/subdir2/hello'), th.doesnt_read(err, '/tmp/subdir2/test'), th.writes(err, '/tmp/newdir/hello'), th.writes(err, '/tmp/newdir/test'), ])
def passes(out, err): return all([ th.reads(err, '/tmp/foo'), th.reads(err, '/tmp/subdir1/foo_symlink'), th.writes( err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789' ), th.mkdirs( err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789' ), th.mkdirs( err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789' ), th.mkdirs( err, '/tmp/subdir1/abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789_abcdef_0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789' ), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.count_writes(err, 0), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.writes(err, '/tmp/still-running'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes_windows(out, err): return all([ th.writes(err, r'\tmp\foo'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.writes(err, '/tmp.vforks'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.writes(err, '/tmp/root_symlink'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all( [th.reads(err, '/tests/ln-s.sh'), th.writes(err, '/tmp-silly'), th.count_writes(err, 1), ])
def passes(out, err): return all( [th.reads(err, '/tests/pyrename-test.py'), th.writes(err, '/tmp/hello-final'), th.count_writes(err, 1), ])
def passes(out, err): return all( [th.reads(err, '/tests/create-many-delete-many.sh'), th.count_writes(err, 0), th.reads(err, '/tmp/root_symlink'), ])
def passes(out, err): return all( [th.reads(err, '/tmp/foo'), th.count_writes(err, 0), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/create-many-delete-many.sh'), th.count_writes(err, 0), th.reads(err, '/tmp/root_symlink'), ])
def passes(out, err): return all( [th.reads(err, '/tests/kill-child.sh'), th.count_writes(err, 0), th.reads(err, '/tmp/root_symlink'), ])
def passes(out, err): return all( [th.reads(err, '/tests/null.test'), th.count_writes(err, 0), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.writes(err, '/tmp/root_symlink'), th.count_writes(err, 1), th.count_readdir(err, 0), ])
def passes(out, err): return all([ th.reads(err, '/tests/kill-child.sh'), th.count_writes(err, 0), th.reads(err, '/tmp/root_symlink'), ])
def passes(out, err): return all([ th.reads(err, '/tests/pyrename-test.py'), th.writes(err, '/tmp/hello-final'), th.count_writes(err, 1), ])
def passes(out, err): return all([ th.reads(err, '/tests/ln-s.sh'), th.writes(err, '/tmp-silly'), th.count_writes(err, 1), ])
def passes(out, err): return all( [th.count_mkdir(err, 0), th.count_writes(err, 0), th.count_readdir(err, 0), ])