| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
atomic(9) primitives are documented as operating on unsigned types.
Here, we need a cast to avoid a tautological comparison.
Add a regression test for access(2), which was affected by the bug.
Reported by: NetApp
Reviewed by: kib
Fixes: e511bd1406fa ("vfs: fully lockless v_writecount adjustment")
MFC after: 1 week
Sponsored by: Klara, Inc.
Sponsored by: NetApp, Inc.
Differential Revision: https://reviews.freebsd.org/D47672
|
|
|
|
|
|
| |
Fixes: 1a720cbec513
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1282
|
|
|
|
|
|
|
|
|
|
| |
- In the msgctl tests, there is no point in sleeping after a fork().
Just block immediately in wait().
- In non-blocking send/recv tests, just wait for the child to exit once
it's reached a message limit. If a bug prevents the child from
exiting promptly, the test will time out.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
| |
The test tries to connect a socket to a closed port at 127.0.0.1. It
sets O_NONBLOCK on the socket first and expects to get EINPROGRESS from
connect(2), but this is not guaranteed, ECONNREFUSED is possible.
Handle both cases, and re-enable the test.
PR: 240621
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
|
|
|
| |
The stack gap implementation is disabled by default now, so the test
passes.
This reverts commit dad71022bd7a8f95ab2ba656bec61e2424a1c3c5.
PR: 259969
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
| |
This reverts commit 4f741801d86089a1c5d631ba1e0f1421cdcf7a7e.
As per discussion in PR: 260303 the reverted patch covered the
real issue with a fixed address of the top of the stack.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With ASLR enabled by default, RLIMIT_STACK test fails due to the fact
that default stack gap can be as big as 15M. Because of that the
resource limit of 4M results in test program receiving SIGSEGV
immediately after exiting the setrlimit syscall. Since the idea of this
test is to check if rlim_cur does not extend past rlim_max, adjusting
the resource limit to 20M should not invalidate the test results.
Obtained from: Semihalf
Sponsored by: Alstom Group
Differential revision: https://reviews.freebsd.org/D33116
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
|
|
|
|
| |
PR: 259969
Sponsored by: The FreeBSD Foundation
|
|
|
|
|
|
|
|
| |
Fix erroneous = that was meant to be ==.
Revision 1.10 from NetBSD t_wait.c
Obtained from: NetBSD
|
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since https://github.com/freebsd/atf/commit/4581cefc1e3811dd3c926b5dd4b15fd63d2e19da
ATF opens the results file on startup. This fixes problems like
capsicumized tests not being able to open the file on exit.
However, this test closes all file descriptors just to check that
socketpair returns fd 3+4 and thereby also closes the ATF results file.
This then results in an EBADF when writing the result so the test is
reported as broken.
While system calls that create new file descriptors (must?) use the lowest
available file descriptor number, it does not seem useful to test this
property here. Drop the check for FD==3/4 to unbreak the testsuite.
We could also try to re-open the results file in ATF if we get a EBADF
error, but that will fail when running under Capsicum.
Reviewed By: cem
Differential Revision: https://reviews.freebsd.org/D28683
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a "suggested parens" compile warning-into-error
that shows up on gcc-6.4.
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D26789
Notes:
svn path=/head/; revision=366727
|
|
|
|
|
|
|
|
|
|
|
|
| |
An old it_value of {4,3} is valid. Allow it.
Reviewed by: bdrewery
MFC after: 2 weeks
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D26445
Notes:
svn path=/head/; revision=366346
|
|
|
|
|
|
|
|
|
|
| |
Commit r352807 fixed various signal numbers and codes from page faults;
adjust the tests so they expect the fixes to be present.
PR: 211924
Notes:
svn path=/head/; revision=352869
|
|
|
|
|
|
|
|
| |
PR: 240621
Sponsored by: The FreeBSD Foundation
Notes:
svn path=/head/; revision=352448
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When O_CREAT is specified, the third, variadic argument is
required as the permission. If on is not passed, then depending
on the ABI, either the contents of the third argument register
or some arbitrary stuff on the stack will be used as the permission.
This has been merged to NetBSD.
Reviewed by: asomers, ngie
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D20972
Notes:
svn path=/head/; revision=350067
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Historically we have not distinguished between kernel wirings and user
wirings for accounting purposes. User wirings (via mlock(2)) were
subject to a global limit on the number of wired pages, so if large
swaths of physical memory were wired by the kernel, as happens with
the ZFS ARC among other things, the limit could be exceeded, causing
user wirings to fail.
The change adds a new counter, v_user_wire_count, which counts the
number of virtual pages wired by user processes via mlock(2) and
mlockall(2). Only user-wired pages are subject to the system-wide
limit which helps provide some safety against deadlocks. In
particular, while sources of kernel wirings typically support some
backpressure mechanism, there is no way to reclaim user-wired pages
shorting of killing the wiring process. The limit is exported as
vm.max_user_wired, renamed from vm.max_wired, and changed from u_int
to u_long.
The choice to count virtual user-wired pages rather than physical
pages was done for simplicity. There are mechanisms that can cause
user-wired mappings to be destroyed while maintaining a wiring of
the backing physical page; these make it difficult to accurately
track user wirings at the physical page layer.
The change also closes some holes which allowed user wirings to succeed
even when they would cause the system limit to be exceeded. For
instance, mmap() may now fail with ENOMEM in a process that has called
mlockall(MCL_FUTURE) if the new mapping would cause the user wiring
limit to be exceeded.
Note that bhyve -S is subject to the user wiring limit, which defaults
to 1/3 of physical RAM. Users that wish to exceed the limit must tune
vm.max_user_wired.
Reviewed by: kib, ngie (mlock() test changes)
Tested by: pho (earlier version)
MFC after: 45 days
Sponsored by: Netflix
Differential Revision: https://reviews.freebsd.org/D19908
Notes:
svn path=/head/; revision=347532
|
|
|
|
|
|
|
|
|
| |
__riscv__ is not pre-defined anymore by latest version of GNU compiler.
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=337238
|
|
|
|
|
|
|
|
|
|
| |
in i is already correct to write to the last item in the buf array.
Obtained from: CheriBSD
Sponsored by: DARPA, AFRL
Notes:
svn path=/head/; revision=336492
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sbt is the time in the future that the tsleep_sbt() is expected to be completed
at. sbtt is the current time. Depending on the precision with sysctl
kern.timecounter.alloweddeviation the start time may be incremented by
tc_tick_sbt. The same increment is needed for the current time of sbtt before
calculating the difference. The impact of missing this increment is that rmtp
may increase by one tc_tick_sbt on every early [EINTR] return. If the same
struct is passed in for rqtp as rmtp this can result in rqtp effectively
incrementing by tc_tick_sbt and sleeping longer than originally intended.
This problem was introduced in r247797.
Reviewed by: kib, markj, vangyzen (all on an older version of the test)
MFC after: 2 weeks
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D14362
Notes:
svn path=/head/; revision=329271
|
|
|
|
|
|
|
|
|
| |
Reviewed by: cem
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D14305
Notes:
svn path=/head/; revision=329108
|
|
|
|
|
|
|
|
|
|
|
| |
sparc64 and riscv do not support 10 arguments, but MIPS now does.
While here, combine clauses for architectures that support the same
number of arguments to reduce duplication.
Sponsored by: DARPA / AFRL
Notes:
svn path=/head/; revision=328634
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The man page is years out of date regarding errors. Our implementation _does_
allow unaligned addresses, and it _does_not_ check for negative lengths,
because the length is unsigned. It checks for overflow instead.
Update the tests accordingly.
Reviewed by: bcr
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D13826
Notes:
svn path=/head/; revision=328266
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
o Replace __riscv64 with (__riscv && __riscv_xlen == 64)
This is required to support new GCC 7.1 compiler.
This is compatible with current GCC 6.1 compiler.
RISC-V is extensible ISA and the idea here is to have built-in define
per each extension, so together with __riscv we will have some subset
of these as well (depending on -march string passed to compiler):
__riscv_compressed
__riscv_atomic
__riscv_mul
__riscv_div
__riscv_muldiv
__riscv_fdiv
__riscv_fsqrt
__riscv_float_abi_soft
__riscv_float_abi_single
__riscv_float_abi_double
__riscv_cmodel_medlow
__riscv_cmodel_medany
__riscv_cmodel_pic
__riscv_xlen
Reviewed by: ngie
Sponsored by: DARPA, AFRL
Differential Revision: https://reviews.freebsd.org/D11901
Notes:
svn path=/head/; revision=322168
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The kern.coredump sysctl can be set to 0 to disable coredumps. Skip the
'status_coredump' and 'wait6_coredumped' tests if this sysctl is set to 0
rather than reporting a failure.
Submitted by: brooks
Reviewed by: ngie
Obtained from: CheriBSD
Sponsored by: DARPA / AFRL
Differential Revision: https://reviews.freebsd.org/D10665
Notes:
svn path=/head/; revision=318363
|
|
|
|
|
|
|
|
|
|
|
|
| |
Restore the stock (upstream) code under an #else block, so it's easier
for me to visualize and understand the code that needs to be upstreamed.
MFC after: 2 months
X-MFC with: r316178, r316179, r316180
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316260
|
|
|
|
|
|
|
|
|
|
|
|
| |
msgsnd(2)'s msgsz argument does not describe the full structure, only the
message component.
Reported by: Coverity
CIDs: 1368703, 1368711
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316181
|
|
|
|
|
|
|
|
|
| |
Reported by: Coverity
CIDs: 1368705, 1368706, 1368707, 1368710
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316180
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
msgsnd's msgsz argument is the size of the message following the 'long'
message type. Don't include the message type in the size of the message
when invoking msgsnd(2).
Reported by: Coverity
CID: 1368712
Sponsored by: Dell EMC Isilon
Notes:
svn path=/head/; revision=316179
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a clock_nanosleep() syscall, as specified by POSIX.
Make nanosleep() a wrapper around it.
Attach the clock_nanosleep test from NetBSD. Adjust it for the
FreeBSD behavior of updating rmtp only when interrupted by a signal.
I believe this to be POSIX-compliant, since POSIX mentions the rmtp
parameter only in the paragraph about EINTR. This is also what
Linux does. (NetBSD updates rmtp unconditionally.)
Copy the whole nanosleep.2 man page from NetBSD because it is complete
and closely resembles the POSIX description. Edit, polish, and reword it
a bit, being sure to keep any relevant text from the FreeBSD page.
Reviewed by: kib, ngie, jilles
MFC after: 3 weeks
Relnotes: yes
Sponsored by: Dell EMC
Differential Revision: https://reviews.freebsd.org/D10020
Notes:
svn path=/head/; revision=315526
|
|
|
|
|
|
|
| |
recent refactoring to the test
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=313382
|
|
|
|
|
|
|
| |
This fixes the build with !(amd64|arm64|mips*)
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312376
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312300
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312299
|
|
|
|
|
|
|
|
|
| |
This includes a number of accepted upstream fixes, as well as
a reimplementation of the net/carp/... testcase (which is
currently unused).
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312295
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312243
|
|
|
|
|
|
|
| |
Remove divergence with upstream where possible
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312221
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312155
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312149
|
|
|
|
|
|
|
| |
correct yet, but it's getting closer.
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312148
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312147
|
|
|
|
|
|
|
|
| |
Use CMSG_FIRSTHDR macro to properly link the kqueue to the socket to
get it to now return -1/EBADF with sendmsg per the testcase expectations
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312146
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312145
|
|
|
|
| |
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312142
|
|
|
|
|
|
|
| |
Sponsored by: Dell EMC Isilon
Notes:
svn path=/projects/netbsd-tests-upstream-01-2017/; revision=312126
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This contains some new testcases in /usr/tests/...:
- .../lib/libc
- .../lib/libthr
- .../lib/msun
- .../sys/kern
Tested on: amd64, i386
MFC after: 1 month
Notes:
svn path=/head/; revision=312008
|
|
|
|
|
|
|
|
|
| |
sys/param.h needs to be #included in order for __FreeBSD_version to be checked
MFC after: 13 days
Notes:
svn path=/head/; revision=311968
|
|
|
|
|
|
|
|
|
|
|
| |
This also (inadvertently) contains an update to
contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases).
MFC after: 2 weeks
In collaboration with: christos@NetBSD.org
Notes:
svn path=/head/; revision=311925
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's no sense in trying to close a file descriptor from the negative cases
with unlink_test; it's best to ignore these cases.
The mkfifo case does make sense to keep though.
MFC after: 3 days
Notes:
svn path=/head/; revision=311919
|