Lines Matching refs:cleanup
40 static void cleanup(void) in cleanup() function
57 tst_brkm(TCONF, cleanup, "O_TMPFILE not supported"); in setup()
59 tst_brkm(TBROK | TERRNO, cleanup, "openat() failed"); in setup()
62 SAFE_CLOSE(cleanup, fd); in setup()
72 tst_brkm(TBROK | TERRNO, cleanup, "openat() failed"); in openat_tmp()
80 SAFE_WRITE(cleanup, 1, fd, buf, size); in write_file()
94 SAFE_FSTAT(cleanup, fd, &st); in test01()
100 SAFE_CLOSE(cleanup, fd); in test01()
105 if (!tst_dir_is_empty(cleanup, ".", 1)) in test01()
106 tst_brkm(TFAIL, cleanup, "found a file, this is not expected"); in test01()
110 SAFE_READLINK(cleanup, path, tmp, PATH_MAX); in test01()
113 SAFE_LINKAT(cleanup, AT_FDCWD, path, AT_FDCWD, "tmpfile", in test01()
116 if (tst_dir_is_empty(cleanup, ".", 1)) in test01()
117 tst_brkm(TFAIL, cleanup, "file not found"); in test01()
119 SAFE_UNLINK(cleanup, "tmpfile"); in test01()
120 SAFE_CLOSE(cleanup, fd); in test01()
130 SAFE_LSEEK(cleanup, fd, 0, SEEK_SET); in read_file()
133 SAFE_READ(cleanup, 0, fd, tmp, size); in read_file()
135 tst_brkm(TFAIL, cleanup, "got unexepected data"); in read_file()
148 SAFE_MKDIR(cleanup, path, 0700); in test02()
149 SAFE_CHDIR(cleanup, path); in test02()
156 SAFE_CHDIR(cleanup, ".."); in test02()
158 SAFE_RMDIR(cleanup, path); in test02()
169 SAFE_CLOSE(cleanup, fd[i]); in test02()
181 SAFE_LINKAT(cleanup, AT_FDCWD, path1, AT_FDCWD, path2, in link_tmp_file()
202 SAFE_MKDIR(cleanup, path, 0700); in test03()
203 SAFE_CHDIR(cleanup, path); in test03()
216 SAFE_LSTAT(cleanup, path, &st); in test03()
221 tst_brkm(TFAIL, cleanup, in test03()
230 SAFE_UNLINK(cleanup, path); in test03()
231 SAFE_CLOSE(cleanup, fd[i]); in test03()
233 SAFE_CHDIR(cleanup, ".."); in test03()
236 SAFE_RMDIR(cleanup, path); in test03()
257 cleanup(); in main()