Lines Matching refs:cleanup
39 static void cleanup(void) in cleanup() function
56 tst_brkm(TCONF, cleanup, "O_TMPFILE not supported"); in setup()
58 tst_brkm(TBROK | TERRNO, cleanup, "openat() failed"); in setup()
61 SAFE_CLOSE(cleanup, fd); in setup()
71 tst_brkm(TBROK | TERRNO, cleanup, "openat() failed"); in openat_tmp()
79 SAFE_WRITE(cleanup, 1, fd, buf, size); in write_file()
93 SAFE_FSTAT(cleanup, fd, &st); in test01()
99 SAFE_CLOSE(cleanup, fd); in test01()
104 if (!tst_dir_is_empty(cleanup, ".", 1)) in test01()
105 tst_brkm(TFAIL, cleanup, "found a file, this is not expected"); in test01()
109 SAFE_READLINK(cleanup, path, tmp, PATH_MAX); in test01()
112 SAFE_LINKAT(cleanup, AT_FDCWD, path, AT_FDCWD, "tmpfile", in test01()
115 if (tst_dir_is_empty(cleanup, ".", 1)) in test01()
116 tst_brkm(TFAIL, cleanup, "file not found"); in test01()
118 SAFE_UNLINK(cleanup, "tmpfile"); in test01()
119 SAFE_CLOSE(cleanup, fd); in test01()
129 SAFE_LSEEK(cleanup, fd, 0, SEEK_SET); in read_file()
132 SAFE_READ(cleanup, 0, fd, tmp, size); in read_file()
134 tst_brkm(TFAIL, cleanup, "got unexepected data"); in read_file()
147 SAFE_MKDIR(cleanup, path, 0700); in test02()
148 SAFE_CHDIR(cleanup, path); in test02()
155 SAFE_CHDIR(cleanup, ".."); in test02()
157 SAFE_RMDIR(cleanup, path); in test02()
168 SAFE_CLOSE(cleanup, fd[i]); in test02()
180 SAFE_LINKAT(cleanup, AT_FDCWD, path1, AT_FDCWD, path2, in link_tmp_file()
201 SAFE_MKDIR(cleanup, path, 0700); in test03()
202 SAFE_CHDIR(cleanup, path); in test03()
215 SAFE_LSTAT(cleanup, path, &st); in test03()
220 tst_brkm(TFAIL, cleanup, in test03()
229 SAFE_UNLINK(cleanup, path); in test03()
230 SAFE_CLOSE(cleanup, fd[i]); in test03()
232 SAFE_CHDIR(cleanup, ".."); in test03()
235 SAFE_RMDIR(cleanup, path); in test03()
256 cleanup(); in main()