Repeating the default WARNS here makes it slightly more difficult to
experiment with default WARNS changes, e.g. if we did something absolutely
bananas and introduced a WARNS=7 and wanted to try lifting the default to
that.
Drop most of them; there is one in the blake2 kernel module, but I suspect
it should be dropped -- the default WARNS in the rest of the build doesn't
currently apply to kernel modules, and I haven't put too much thought into
whether it makes sense to make it so.
The timespecadd(3) family of macros were imported from NetBSD back in
r35029. However, they were initially guarded by #ifdef _KERNEL. In the
meantime, we have grown at least 28 syscalls that use timespecs in some
way, leading many programs both inside and outside of the base system to
redefine those macros. It's better just to make the definitions public.
Our kernel currently defines two-argument versions of timespecadd and
timespecsub. NetBSD, OpenBSD, and FreeDesktop.org's libbsd, however, define
three-argument versions. Solaris also defines a three-argument version, but
only in its kernel. This revision changes our definition to match the
common three-argument version.
Bump _FreeBSD_version due to the breaking KPI change.
Discussed with: cem, jilles, ian, bde
Differential Revision: https://reviews.freebsd.org/D14725
Before this test just checked scenario of setting and removing the accept
filter at different states of the socket. Now it also checks that accept
filter works: we connect to the server, and then check that we can't accept,
then we send 1 byte of data and check again.
sources to return timestamps when SO_TIMESTAMP is enabled. Two additional
clock sources are:
o nanosecond resolution realtime clock (equivalent of CLOCK_REALTIME);
o nanosecond resolution monotonic clock (equivalent of CLOCK_MONOTONIC).
In addition to this, this option provides unified interface to get bintime
(equivalent of using SO_BINTIME), except it also supported with IPv6 where
SO_BINTIME has never been supported. The long term plan is to depreciate
SO_BINTIME and move everything to using SO_TS_CLOCK.
Idea for this enhancement has been briefly discussed on the Net session
during dev summit in Ottawa last June and the general input was positive.
This change is believed to benefit network benchmarks/profiling as well
as other scenarios where precise time of arrival measurement is necessary.
There are two regression test cases as part of this commit: one extends unix
domain test code (unix_cmsg) to test new SCM_XXX types and another one
implementis totally new test case which exchanges UDP packets between two
processes using both conventional methods (i.e. calling clock_gettime(2)
before recv(2) and after send(2)), as well as using setsockopt()+recv() in
receive path. The resulting delays are checked for sanity for all supported
clock types.
Reviewed by: adrian, gnn
Differential Revision: https://reviews.freebsd.org/D9171
away in the past from the current time. This should be plenty for the
scheduler to do its job. It provides assurance that the timestamp
returned is actually a valid one, not just some random garbage.
used. We can do it programmatically, but that would make code convoluted
and more complex. I have two more of those types coming for the CLOCK_REALTIME
and CLOCK_MONOTONIC. This seems like an elegant and scallable approach.
file into smaller pieces that are hopefully easier to understand
and extend. This is to pave the ground for adding few more
socket timestamp formats that I am working on here.
No functional changes (I hope).
the second set (increment the original ports by 10)
This avoids issues where the first listening socket might not be torn
down by the time it makes it to the second set of testcases.
The sockets should likely only be setup once, but this keeps in the
spirit of the original testcases, so this will be easier to backport
to ^/stable/9
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
It always fails when trying to send through the sendit(9) private KPI in the
kernel due to a size mismatch between the msghdr and data being sent [*], which
suspiciously seems like it's related to sizeof pointers instead of scalars, or
something of that ilk
MFC after: 1 week
PR: 206543, 206544 [*]
Sponsored by: EMC / Isilon Storage Division
check_scm_creds_sockcred after initial != NULL checks have been done for
debugging purposes
- Use more terse names for bintime (bt), cmesgcred (cmcred),
sockcred (sc), and timeval (tv) [*]
- Add some debug messages to better understand some of the flow of the test
program
MFC after: 1 week
Requested by: bde [*]
Use of the word "terse" (^.^) corrected by: jhb, rpokala [*]
Sponsored by: EMC / Isilon Storage Division
- Get rid of unused argc/argv variables in main
- Exit on failure with a return code of 1 instead of -1 with err/errx as a
return code of -1 is implementation dependent
- Bump WARNS to 6
MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division
reconnect.c:
- Convert the K&R prototype of main to an ANSI prototype to mute a
warning from gcc 4.2.1
- Close s_sock2 after finishing off the last test to plug a leak and
mute a warning from gcc 5.0 about a -Wunused-but-set variable
sendfile.c:
- Fix a -Wunused-but-set warning with gcc 5.0 with pagesize in main(..)
MFC after: 5 days
Sponsored by: EMC / Isilon Storage Division
- `SOCK_RAW` is the implied supported type parameter for socket(2) per route(4)
- localsw in `sys/kern/uipc_usrreq.c` doesn't have an entry for `SOCK_RAW`, so
the prototype is invalid (this isn't explicitly documented anywhere I could
find)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
This will help ensure that scripts/parsers don't get confused when the message
is printed out
MFC after: 3 days
Sponsored by: EMC / Isilon Storage Division
suite as tests/sys/kern/unix_passfd_test
- Convert testcases to ATF
- Fix an alignment issues
- Mark rights_creds_payload(..) as an expected failure (see PR # 181741)
Based [in part] on the following Differential Revision:
https://reviews.freebsd.org/D689
MFC after: 1 week
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division
- Delete some spurious whitespace
- Use calloc instead of malloc in the last test to ensure that
sendspace is properly zero'ed out
Differential Revision: https://reviews.freebsd.org/D689 (part of a larger diff)
MFC after: 1 week
Reviewed by: asomers, ngie
Submitted by: markj
Sponsored by: EMC / Isilon Storage Division
testcases into the .c file
- Require root for now because it fails with SOCK_RAW without root privileges
- Increment the test count properly on socket create failure
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
- Make the socket path random and move it out of /tmp as that's outside ATF's
prescribed path
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
- Replace a hardcoded PATH_MAX value with sizeof(path)
- Use path like an array, not a pointer, and always try to unlink it in cleanup
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
- Randomize the bind port to allow 2+ consecutive calls in < 10 minutes, and
to also not fail if (for instance) there's a server already listening on port
8080
- Don't leak the listening socket / fds into the child process
- Fix warnings:
-- Remove argc/argv (-Wunused)
-- Mark sig __unused (-Wunused)
-- Mark quit static (-Wmissing-variable-declarations)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
The output is still broken if prove -rv is run and the testcase aborts
prematurely with fail_assertion (the testcase doesn't really conform to TAP
protocol properly, except when it completes fully)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division
The testcase fails today on subtest # 9
The output is still broken if prove -rv is run and the testcase aborts
prematurely (the testcase doesn't really conform to TAP protocol properly,
except when it completes fully)
MFC after: 1 week
Sponsored by: EMC / Isilon Storage Division