Home
last modified time | relevance | path

Searched refs:ftruncate (Results 1 – 25 of 213) sorted by relevance

123456789

/freebsd/contrib/pjdfstest/tests/ftruncate/
H A D00.t20 expect 0 open ${n0} O_RDWR : ftruncate 0 1234567
22 expect 0 open ${n0} O_WRONLY : ftruncate 0 567
27 expect 0 open ${n0} O_RDWR : ftruncate 0 23456
29 expect 0 open ${n0} O_WRONLY : ftruncate 0 1
37 expect 0 open ${n0} O_RDWR : ftruncate 0 123
46 expect EINVAL -u 65534 open ${n0} O_RDONLY : ftruncate 0 123
52 expect 0 open ${n0} O_CREAT,O_RDWR 0 : ftruncate 0 0
55 expect 0 -u 65534 open ${n0} O_CREAT,O_RDWR 0 : ftruncate 0 0
H A D13.t15 expect EINVAL -- open ${n0} O_RDWR : ftruncate 0 -1
16 expect EINVAL -- open ${n0} O_WRONLY : ftruncate 0 -999999
/freebsd/tools/test/stress2/misc/
H A Dftruncate.sh43 sed '1,/^EOF/d' < $odir/$0 > ftruncate.c
44 rm -f /tmp/ftruncate
45 mycc -o ftruncate -Wall -Wextra -O2 -g ftruncate.c -lpthread || exit 1
46 rm -f ftruncate.c
57 (cd /tmp; /tmp/ftruncate $dir)
62 rm -f /tmp/ftruncate
147 if (ftruncate(fd2, offset) == 0) {
H A Dfexecve.sh63 if (ftruncate(fd, sz) < 0)
74 if (ftruncate(fd, 0) != 0)
76 if (ftruncate(fd, sz) != 0)
H A Dmmap25.sh98 if (ftruncate(fd, pos) == -1)
100 if (ftruncate(fd, len) == -1)
H A Dmmap26.sh94 if (ftruncate(fd, (off_t)0) == -1)
96 if (ftruncate(fd, len) == -1)
H A Dmmap28.sh94 if (ftruncate(fd, len) == -1)
108 if (ftruncate(fd, len / 2) == -1)
H A Dtruncate6.sh108 if (ftruncate(fd, pos) < 0)
112 if (ftruncate(fd, data) < 0)
H A Dtruncate9.sh93 if (ftruncate(fd, pos) == -1)
105 if (ftruncate(fd, pos) == -1)
H A Dpthread9.sh104 if (ftruncate(fd, 0) == -1)
123 if (ftruncate(fd, 0) == -1)
H A Dmsdos18.sh149 ftruncate(fd, FSIZE / 2);
150 ftruncate(fd, FSIZE);
H A Dtruncate8.sh158 if (ftruncate(fd, pos) == -1)
161 if (ftruncate(fd, FSIZE) == -1)
/freebsd/tests/sys/file/
H A Dftruncate_test.c88 if (ftruncate(fd, -1) == 0) in main()
95 if (ftruncate(fd, len) < 0) in main()
118 if (ftruncate(fd, len) < 0) in main()
131 if (ftruncate(read_only_fd, 0) == 0) in main()
143 if (ftruncate(fd, 0) == 0) in main()
154 if (ftruncate(fds[0], 0) == 0) in main()
167 if (ftruncate(fds[0], 0) == 0) in main()
/freebsd/tests/sys/vm/
H A Dmlock_test.c130 ATF_REQUIRE(ftruncate(fd, len) == 0); in ATF_TC_BODY()
136 ATF_REQUIRE(ftruncate(fd, 0) == 0); in ATF_TC_BODY()
137 ATF_REQUIRE(ftruncate(fd, len) == 0); in ATF_TC_BODY()
159 ATF_REQUIRE(ftruncate(fd, len) == 0); in ATF_TC_BODY()
164 ATF_REQUIRE(ftruncate(fd, 0) == 0); in ATF_TC_BODY()
205 error = ftruncate(shmfd, len); in ATF_TC_BODY()
235 error = ftruncate(shmfd, len - pagesizes[0]); in ATF_TC_BODY()
241 error = ftruncate(shmfd, len); in ATF_TC_BODY()
/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_mmap.c444 ATF_REQUIRE(ftruncate(fd, page) == 0); in ATF_TC_BODY()
453 ATF_REQUIRE(ftruncate(fd, 0) == 0); in ATF_TC_BODY()
454 ATF_REQUIRE(ftruncate(fd, page / 8) == 0); in ATF_TC_BODY()
455 ATF_REQUIRE(ftruncate(fd, page / 4) == 0); in ATF_TC_BODY()
456 ATF_REQUIRE(ftruncate(fd, page / 2) == 0); in ATF_TC_BODY()
457 ATF_REQUIRE(ftruncate(fd, page / 12) == 0); in ATF_TC_BODY()
458 ATF_REQUIRE(ftruncate(fd, page / 64) == 0); in ATF_TC_BODY()
498 ATF_REQUIRE(ftruncate(fd, 0) == 0); in ATF_TC_BODY()
H A Dt_truncate.c66 ATF_REQUIRE(ftruncate(fd, sizes[i]) == 0); in ATF_TC_BODY()
99 ATF_REQUIRE_ERRNO(EBADF, ftruncate(-1, 999) == -1); in ATF_TC_BODY()
102 ATF_REQUIRE_ERRNO(EINVAL, ftruncate(fd, 999) == -1); in ATF_TC_BODY()
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/funcs/
H A Dtst.ftruncate.ksh39 ftruncate();
56 tmpfile=/tmp/tst.ftruncate.$$
/freebsd/tests/sys/posixshm/
H A Dmemfd_test.c52 ATF_REQUIRE(ftruncate(fd, 2 * (sizeof(buf) - 1)) == 0); in ATF_TC_BODY()
101 ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); in ATF_TC_BODY()
130 ATF_REQUIRE(ftruncate(fd, BUF_SIZE) == 0); in ATF_TC_BODY()
179 ATF_REQUIRE(ftruncate(fd, initial_size) == 0); in memfd_truncate_test()
183 err = ftruncate(fd, dest_size); in memfd_truncate_test()
/freebsd/tests/sys/audit/
H A Dfile-write.c98 ATF_REQUIRE_EQ(0, ftruncate(filedesc, offlen)); in ATF_TC_BODY()
121 ATF_REQUIRE_EQ(-1, ftruncate(-1, offlen)); in ATF_TC_BODY()
/freebsd/cddl/compat/opensolaris/include/
H A Dunistd.h34 #define ftruncate64 ftruncate
/freebsd/tools/regression/fsx/
H A Dfsx.c422 ftruncate(fd, (off_t)0); in check_trunc_hack()
423 ftruncate(fd, (off_t)100000); in check_trunc_hack()
429 ftruncate(fd, (off_t)0); in check_trunc_hack()
677 if (ftruncate(fd, file_size) == -1) { in domapwrite()
731 if (ftruncate(fd, (off_t)size) == -1) { in dotruncate()
757 if (lite ? 0 : ftruncate(fd, file_size) == -1) { in writefileimage()
/freebsd/contrib/netbsd-tests/kernel/
H A Dt_lockf.c136 ATF_REQUIRE_MSG(ftruncate(fd, filesize) >= 0, in ATF_TC_BODY()
231 ATF_REQUIRE_MSG(ftruncate(fd, filesize) >= 0, in ATF_TC_BODY()
/freebsd/cddl/usr.sbin/dtrace/tests/common/funcs/
H A DMakefile68 tst.ftruncate.ksh \
69 tst.ftruncate.ksh.out \
/freebsd/contrib/llvm-project/compiler-rt/lib/sanitizer_common/
H A Dsanitizer_solaris.cpp114 DECLARE__REAL_AND_INTERNAL(uptr, ftruncate, fd_t fd, uptr size) { in DECLARE__REAL_AND_INTERNAL() argument
115 return ftruncate(fd, size); in DECLARE__REAL_AND_INTERNAL()
/freebsd/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/
H A Dexception.lst73 # freopen() and ftruncate() not supported by Java DTrace API
76 common/funcs/tst.ftruncate.ksh

123456789