History log of /freebsd-10-stable/tests/sys/file/
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
319301 31-May-2017 ngie

MFC r319056,r319058,r319059,r319060,r319061,r319078:

r319056:

tests/sys/file/ftruncate_test: use an exit code of 1 instead
of -1 with err*(3).

An exit code of -1 is implementation defined -- it's best to stick
with something well-defined (1).

r319058:

Create a deterministic file in the kyua sandbox, instead of a
temporary file outside the kyua sandbox

This helps ensure that the file is removed at test exit, and as
a side effect, cures a warning about umasks with Coverity.

r319059:

Use an exit code of 1 instead of -1 for reasons noted in r319056

r319060:

Use main(void) instead of main(argc __unused, argv __unused)

r319061:

Don't leak accept_fd on thread completion

CID: 1296068

r319078:

Tweak r319058 slightly

- Specify an explicit mode when using O_CREAT per open(2).
- Fix the error message (add missing enclosing parentheses).

MFC with: r319058

312323 17-Jan-2017 ngie

MFC r312111:

Remove unused vars to fix -Wunused issues

298490 22-Apr-2016 ngie

MFC r298024,r298196:

r298024:

Set test_argv to NULL, not 0, if not executing a specific test

r298196:

Minor cosmetic cleanup

- Remove spurious trailing whitespace in licensing header
- Remove unnecessary semi-colon after comment

292854 29-Dec-2015 ngie

MFC r292582:

Dump out the output from flock_helper on failure so failures with the
test app can be debugged

Obtained from: Isilon OneFS (^/onefs/head@r511419)
Sponsored by: EMC / Isilon Storage Division

282842 13-May-2015 ngie

MFC r282067:

Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo
and tools/regression/file into the FreeBSD test suite as tests/sys/file

282067 27-Apr-2015 ngie

Integrate tools/regression/fifo into the FreeBSD test suite as tests/sys/fifo
and tools/regression/file into the FreeBSD test suite as tests/sys/file

MFC after: 1 week


281432 11-Apr-2015 ngie

Integrate tools/regression/file into the FreeBSD test suite as tests/sys/file


281414 11-Apr-2015 ngie

Integrate more tests into the FreeBSD test suite from tools/regression, etc


277527 22-Jan-2015 ngie

Make this compile with WARNS=6 and clang/gcc

MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division


268385 08-Jul-2014 kib

Make this compilable on latest Linux'es without warnings.

Sponsored by: The FreeBSD Foundation
MFC after: 1 week


264400 13-Apr-2014 imp

NO_MAN= has been deprecated in favor of MAN= for some time, go ahead
and finish the job. ncurses is now the only Makefile in the tree that
uses it since it wasn't a simple mechanical change, and will be
addressed in a future commit.


254888 25-Aug-2013 jilles

Fix fcntl F_GETFL F_SETFL for files opened execute-only (O_EXEC).

The FFLAGS and OFLAGS now work correctly also for files opened with O_EXEC.
Except possibly fuse, the other users pass values without O_EXEC set. fuse
appears to assume O_EXEC is handled correctly.

Although F_SETFL may not be commonly used for execute-only file descriptors,
F_GETFL may be useful to find the access mode.


254411 16-Aug-2013 jilles

Add tests for dup3().


250530 11-May-2013 jilles

Add simple testcases for fcntl(F_DUP2FD_CLOEXEC).


250513 11-May-2013 jilles

Add simple testcases for fcntl(F_DUPFD_CLOEXEC).


250512 11-May-2013 jilles

Add missing argument to fcntl(F_DUPFD) in regression test.


228975 30-Dec-2011 uqs

Spelling fixes for tools/

Add some $FreeBSD$ tags so svn will allow the commit.


204311 25-Feb-2010 ru

Fixed missing or broken library dependencies.


203800 12-Feb-2010 ru

Fixed error checking of pthread(3) functions.

PR: 143807
Submitted by: pluknet (partly)


194262 15-Jun-2009 jhb

Add a new 'void closefrom(int lowfd)' system call. When called, it closes
any open file descriptors >= 'lowfd'. It is largely identical to the same
function on other operating systems such as Solaris, DFly, NetBSD, and
OpenBSD. One difference from other *BSD is that this closefrom() does not
fail with any errors. In practice, while the manpages for NetBSD and
OpenBSD claim that they return EINTR, they ignore internal errors from
close() and never return EINTR. DFly does return EINTR, but for the common
use case (closing fd's prior to execve()), the caller really wants all
fd's closed and returning EINTR just forces callers to call closefrom() in
a loop until it stops failing.

Note that this implementation of closefrom(2) does not make any effort to
resolve userland races with open(2) in other threads. As such, it is not
multithread safe.

Submitted by: rwatson (initial version)
Reviewed by: rwatson
MFC after: 2 weeks


192949 28-May-2009 zml

Add a regression test for multiple threads of the same process acquiring the same fcntl lock.

Approved by: dfr (mentor)


188483 11-Feb-2009 rwatson

Add a regresion test to determine whether or not a file descriptor is
allocated in a fork(2)-inheritable way at the beginning or end of an
accept(2) system call. This test creates a test thread and blocks it
in accept(2), then forks a child process which tests to see if the
next available file descriptor is defined or not (EBADF vs EINVAL for
ftruncate(2)).

This detects a regression introduced during the network stack locking
work, in which a very narrow race during which fork(2) from one
thread during accept(2) in a second thread lead to an extra inherited
file descriptor turned into a very wide race ensuring that a
descriptor was leaked into the child even though it hadn't been
returned.

PR: kern/130348


180025 26-Jun-2008 dfr

Re-implement the client side of rpc.lockd in the kernel. This implementation
provides the correct semantics for flock(2) style locks which are used by the
lockf(1) command line tool and the pidfile(3) library. It also implements
recovery from server restarts and ensures that dirty cache blocks are written
to the server before obtaining locks (allowing multiple clients to use file
locking to safely share data).

Sponsored by: Isilon Systems
PR: 94256
MFC after: 2 weeks


177638 26-Mar-2008 dfr

Fix the __FreeBSD_version check.


177636 26-Mar-2008 dfr

Add some regression tests for posix record locks.


176957 08-Mar-2008 antoine

Introduce a new F_DUP2FD command to fcntl(2), for compatibility with
Solaris and AIX.
fcntl(fd, F_DUP2FD, arg) and dup2(fd, arg) are functionnaly equivalent.
Document it.
Add some regression tests (identical to the dup2(2) regression tests).

PR: 120233
Submitted by: Jukka Ukkonen
Approved by: rwaston (mentor)
MFC after: 1 month


164192 11-Nov-2006 maxim

o Indent by tab.


164191 11-Nov-2006 maxim

o Add several regression tests for dup(2), dup2(2) and fcntl(F_DUPFD).

Obtained from: OpenBSD


160202 09-Jul-2006 maxim

o style.Makefile(5): WARNS= -> WARNS?=.


160201 09-Jul-2006 rwatson

When extending a file with truncate, check that newly added bytes have
a value of 0 in the extended region.

Make sure that we get EINVAL back if we try to truncate a read-only
file descriptor.


160200 09-Jul-2006 rwatson

Add regression tests to make sure that attempting to call ftruncate() on
various non-file objects fails.


160199 09-Jul-2006 rwatson

Add very basic ftruncate() regression test, with a comment rather more
thorough than the tests regarding what should be tested.