Lines Matching refs:testfile
115 char *testfile = argv[0]; variable
119 fd = open(testfile, O_RDONLY, 0666);
120 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
124 T_ASSERT_NE(err, -1, "Acquire read lease: %s", testfile);
128 T_ASSERT_EQ(err, F_RDLCK, "Retrieve lease: %s", testfile);
130 T_ASSERT_POSIX_SUCCESS(close(fd), "Close test file: %s", testfile);
135 char *testfile = argv[0]; variable
139 fd = open(testfile, O_RDONLY, 0666);
140 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
145 testfile);
147 T_ASSERT_POSIX_SUCCESS(close(fd), "Close test file: %s", testfile);
152 char *testfile = argv[0]; variable
156 fd = open(testfile, O_RDWR, 0666);
157 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDWR: %s", testfile);
162 testfile);
164 T_ASSERT_POSIX_SUCCESS(close(fd), "Close test file: %s", testfile);
171 char *testfile = argv[0]; variable
175 fd = open(testfile, O_RDONLY, 0666);
176 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
180 T_ASSERT_NE(err, -1, "Acquire read lease: %s", testfile);
187 (NOTE_LEASE_DOWNGRADE | NOTE_LEASE_RELEASE), 0, (void *)testfile);
204 T_ASSERT_NE(err, -1, "Release lease: %s", testfile);
214 char *testfile = argv[0]; variable
218 fd = open(testfile, O_RDONLY, 0666);
219 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
223 T_ASSERT_NE(err, -1, "Acquire write lease: %s", testfile);
230 (NOTE_LEASE_DOWNGRADE | NOTE_LEASE_RELEASE), 0, (void *)testfile);
247 T_ASSERT_NE(err, -1, "Downgrade to read lease: %s", testfile);
257 char *testfile = argv[0]; variable
261 rw_fd1 = open(testfile, O_RDWR, 0666);
262 T_ASSERT_NE(rw_fd1, -1, "Open test fi1e in O_RDWR: %s", testfile);
265 rw_fd2 = open(testfile, O_RDWR, 0666);
266 T_ASSERT_NE(rw_fd2, -1, "Open test fi1e in O_RDWR: %s", testfile);
269 fd = open(testfile, O_EVTONLY, 0666);
270 T_ASSERT_NE(fd, -1, "Open test fi1e in O_EVTONLY: %s", testfile);
275 T_ASSERT_NE(err, -1, "Acquire write lease: %s", testfile);
282 (NOTE_LEASE_DOWNGRADE | NOTE_LEASE_RELEASE), 0, (void *)testfile);
300 T_ASSERT_NE(err, -1, "Downgrade to read lease: %s", testfile);
312 char *testfile = argv[0]; variable
320 fd = open(testfile, O_RDONLY, 0666);
321 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
325 T_ASSERT_NE(err, -1, "Acquire read lease: %s", testfile);
338 (NOTE_LEASE_DOWNGRADE | NOTE_LEASE_RELEASE), 0, (void *)testfile);
414 char *testfile = argv[0]; variable
421 fd = open(testfile, O_RDWR, 0666);
422 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDWR: %s", testfile);
427 char *testfile = argv[0]; variable
434 fd = open(testfile, O_RDONLY, 0666);
435 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
440 char *testfile = argv[0]; variable
447 err = truncate(testfile, 0);
448 T_ASSERT_NE(err, -1, "Truncate test fi1e: %s", testfile);
454 char *testfile = argv[0]; variable
461 fd = open(testfile, O_RDONLY, 0666);
462 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
471 T_ASSERT_NE(err, -1, "Acquire read range lock on test fi1e: %s", testfile);
480 T_ASSERT_NE(err, -1, "Release read range lock on test fi1e: %s", testfile);
489 char *testfile = argv[0]; variable
497 fd = open(testfile, O_RDWR | O_CREAT, 0666);
498 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDWR|O_CREAT: %s", testfile);
504 T_ASSERT_NE(err, -1, "fdtruncate: %s", testfile);
510 T_ASSERT_NE(err, -1, "write: %s", testfile);
515 T_ASSERT_NE(err, -1, "write: %s", testfile);
518 T_ASSERT_POSIX_SUCCESS(close(fd), "Close test file: %s", testfile);
521 fd = open(testfile, O_RDONLY, 0666);
522 T_ASSERT_NE(fd, -1, "Open test fi1e in O_RDONLY: %s", testfile);
526 err = chflags(testfile, 0);
527 T_ASSERT_NE(err, -1, "chflags: %s", testfile);
532 T_ASSERT_NE(err, -1, "fchflags: %s", testfile);
537 err = chmod(testfile, S_IRWXU);
538 T_ASSERT_NE(err, -1, "chmod: %s", testfile);
543 T_ASSERT_NE(err, -1, "fchmod: %s", testfile);
547 snprintf(destfile, sizeof(destfile), "%s.%d", testfile, rand());
549 err = clonefile(testfile, destfile, CLONE_NOFOLLOW);
550 T_ASSERT_NE(err, -1, "clonefile src: %s dest: %s", testfile, destfile);
555 err = copyfile(testfile, destfile, NULL, COPYFILE_DATA | COPYFILE_STAT);
556 T_ASSERT_NE(err, -1, "copyfile src: %s dest: %s", testfile, destfile);
567 err = setxattr(testfile, xattr_key, &xattr_val[0], sizeof(xattr_val), 0, 0);
568 T_ASSERT_NE(err, -1, "setxattr: %s", testfile);
572 err = removexattr(testfile, xattr_key, 0);
573 T_ASSERT_NE(err, -1, "removexattr: %s", testfile);
578 T_ASSERT_NE(err, -1, "fsetxattr: %s", testfile);
583 T_ASSERT_NE(err, -1, "fremovexattr: %s", testfile);
593 err = setattrlist(testfile, &attrlist, &flags, sizeof(flags), 0);
594 T_ASSERT_NE(err, -1, "setattrlist: %s", testfile);
599 T_ASSERT_NE(err, -1, "fsetattrlist: %s", testfile);
604 err = truncate(testfile, 0);
605 T_ASSERT_NE(err, -1, "truncate: %s", testfile);
610 err = utimes(testfile, NULL);
611 T_ASSERT_NE(err, -1, "utimes: %s", testfile);
616 T_ASSERT_NE(err, -1, "futimes: %s", testfile);
618 T_ASSERT_POSIX_SUCCESS(close(fd), "Close test file: %s", testfile);
624 char *testfile = argv[0]; variable
627 snprintf(destfile, sizeof(destfile), "%s.%d", testfile, rand());