Esempio n. 1
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),
    ])
Esempio n. 2
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),
    ])
Esempio n. 3
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),
    ])
Esempio n. 4
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),
     ])
Esempio n. 5
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),
    ])
Esempio n. 6
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),
     ])
Esempio n. 7
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),
    ])
Esempio n. 8
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),
    ])
Esempio n. 9
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),
    ])
Esempio n. 10
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),
     ])
Esempio n. 11
0
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),
    ])
Esempio n. 12
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),
    ])
Esempio n. 13
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),
     ])
Esempio n. 14
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),
    ])
Esempio n. 15
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),
     ])
Esempio n. 16
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),
    ])
Esempio n. 17
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),
     ])
Esempio n. 18
0
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),
    ])
Esempio n. 19
0
def passes(out, err):
    return all(
        [th.reads(err, '/tmp/foo'),
         th.reads(err, '/tmp/subdir1/foo_symlink'),
         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_readdir(err, 0),
     ])
Esempio n. 20
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),
     ])
Esempio n. 21
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),
     ])
Esempio n. 22
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),
    ])
Esempio n. 23
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),
     ])
Esempio n. 24
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),
     ])
Esempio n. 25
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),
    ])
Esempio n. 26
0
def passes(out, err):
    return all(
        [th.reads(err, '/tests/null.test'),
         th.count_writes(err, 0),
         th.count_readdir(err, 0),
     ])
Esempio n. 27
0
def passes(out, err):
    return all(
        [th.writes(err, '/tmp/still-running'),
         th.count_writes(err, 1),
         th.count_readdir(err, 0),
     ])
Esempio n. 28
0
def passes_windows(out, err):
    return all([
        th.writes(err, r'\tmp\foo'),
        th.count_writes(err, 1),
        th.count_readdir(err, 0),
    ])
Esempio n. 29
0
def passes(out, err):
    return all(
        [th.writes(err, '/tmp.vforks'),
         th.count_writes(err, 1),
         th.count_readdir(err, 0),
     ])
Esempio n. 30
0
def passes(out, err):
    return all(
        [th.writes(err, '/tmp/root_symlink'),
         th.count_writes(err, 1),
         th.count_readdir(err, 0),
     ])
Esempio n. 31
0
def passes(out, err):
    return all([
        th.count_writes(err, 0),
        th.count_readdir(err, 0),
    ])
Esempio n. 32
0
def passes(out, err):
    return all(
        [th.reads(err, '/tmp/foo'),
         th.count_writes(err, 0),
         th.count_readdir(err, 0),
     ])
Esempio n. 33
0
def passes(out, err):
    return all([
        th.writes(err, '/tmp/root_symlink'),
        th.count_writes(err, 1),
        th.count_readdir(err, 0),
    ])
Esempio n. 34
0
def passes(out, err):
    return all(
        [th.count_mkdir(err, 0),
         th.count_writes(err, 0),
         th.count_readdir(err, 0),
     ])