History log of /freebsd-10-stable/tests/sys/file/newfileops_on_fork_test.c
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


# 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


# 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


# 203800 12-Feb-2010 ru

Fixed error checking of pthread(3) functions.

PR: 143807
Submitted by: pluknet (partly)


# 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