• Home
  • Raw
  • Download

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, "open() failed"); in setup()
61 SAFE_CLOSE(cleanup, fd); in setup()
69 SAFE_WRITE(cleanup, 1, fd, buf, size); in write_file()
78 fd = SAFE_OPEN(cleanup, ".", O_TMPFILE | O_RDWR, 0600); in test01()
83 SAFE_FSTAT(cleanup, fd, &st); in test01()
89 SAFE_CLOSE(cleanup, fd); in test01()
94 if (!tst_dir_is_empty(cleanup, ".", 1)) in test01()
95 tst_brkm(TFAIL, cleanup, "found a file, this is not expected"); in test01()
99 SAFE_READLINK(cleanup, path, tmp, PATH_MAX); in test01()
102 SAFE_LINKAT(cleanup, AT_FDCWD, path, AT_FDCWD, "tmpfile", in test01()
105 if (tst_dir_is_empty(cleanup, ".", 1)) in test01()
106 tst_brkm(TFAIL, cleanup, "file not found"); in test01()
108 SAFE_UNLINK(cleanup, "tmpfile"); in test01()
109 SAFE_CLOSE(cleanup, fd); in test01()
119 SAFE_LSEEK(cleanup, fd, 0, SEEK_SET); in read_file()
122 SAFE_READ(cleanup, 0, fd, tmp, size); in read_file()
124 tst_brkm(TFAIL, cleanup, "got unexepected data"); in read_file()
137 SAFE_MKDIR(cleanup, path, 0700); in test02()
138 SAFE_CHDIR(cleanup, path); in test02()
140 fd[i] = SAFE_OPEN(cleanup, ".", O_TMPFILE | O_RDWR, 0600); in test02()
145 SAFE_CHDIR(cleanup, ".."); in test02()
147 SAFE_RMDIR(cleanup, path); in test02()
158 SAFE_CLOSE(cleanup, fd[i]); in test02()
170 SAFE_LINKAT(cleanup, AT_FDCWD, path1, AT_FDCWD, path2, in link_tmp_file()
191 SAFE_MKDIR(cleanup, path, 0700); in test03()
192 SAFE_CHDIR(cleanup, path); in test03()
196 fd[i] = SAFE_OPEN(cleanup, ".", O_TMPFILE | O_RDWR, perm); in test03()
205 SAFE_LSTAT(cleanup, path, &st); in test03()
210 tst_brkm(TFAIL, cleanup, in test03()
219 SAFE_UNLINK(cleanup, path); in test03()
220 SAFE_CLOSE(cleanup, fd[i]); in test03()
222 SAFE_CHDIR(cleanup, ".."); in test03()
225 SAFE_RMDIR(cleanup, path); in test03()
246 cleanup(); in main()