| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1671
Closes: https://github.com/freebsd/freebsd-src/pull/1671
|
|
|
|
|
|
| |
This change was unreviewed and should not have been committed to :main.
This reverts commit 9b37d84c87e69dabc69d818aa4d2fea718bd8b74.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These tests were recently enabled on main and have failed consistently
since they were enabled.
- lib.libc.net.getaddrinfo.getaddrinfo.basic
- lib.libc.net.getaddrinfo.getaddrinfo.nofamily
- lib.libc.net.getaddrinfo.getaddrinfo_test.basic
- lib.libc.net.getaddrinfo.getaddrinfo_test.empty_servname
- lib.libc.net.getaddrinfo.getaddrinfo_test.sock_raw
Mark them as expected failures so they no longer count as failures in
Jenkins CI.
PR: 285826
MFC with: 5313457780, 0b773a94ab
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Summary:
Fix short flags without whitespace, e.g:
zgrep -wefoo test
Fix multiple -e flags:
zgrep -e foo -e xxx test
Previously only the last pattern would be used.
Clean up possible leading blank in ${grep_args}.
Update comment: 2.51 -> 2.6.0
Add a test case for the last known zgrep wrapper issue: recursion
(-r) not implemented.
Reviewers: markj, kevans, ngie, bapt
Reviewed By: markj
Subscribers: imp
Differential Revision: https://reviews.freebsd.org/D48873
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
This test case verifies that grep detects symlink loops when traversing
a directory hierarchy.
Fixes: fc12c191c087 ("grep: Default to -p instead of -S.")
Reviewed by: ngie, jhb
Reported by: Jenkins
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D46544
|
|
|
|
|
|
|
| |
The test passes after commit 5ab6ed93cd36
("faccessat(2): Honor AT_SYMLINK_NOFOLLOW").
Reported by: Jenkins
|
|
|
|
|
|
| |
Fixes: 1a720cbec513
Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/1282
|
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Notably:
- libc needs to #undef some of the macros from ssp/* for underlying
implementations
- ssp/* wants a __RENAME() macro (snatched more or less from NetBSD)
There's some extra hinkiness included for read(), since libc spells it
as "_read" while the rest of the world spells it "read."
Reviewed by: imp, ngie
Sponsored by: Stormshield
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D32307
|
|
|
|
|
|
|
|
| |
This test passes after commit 08f3d5b60cdf ("copy_file_range: Call
vn_rdwr() at least once").
PR: 274615
MFC after: 1 month
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* The empty test case no longer fails because 89f1dcb3eb46 causes empty
files to bypass the bug.
* The bug still exists, so add a test case which exercises it.
* While here, tighten up some of the checks.
A similar patch has been submitted upstream.
PR: 274615
X-MFC-With: 89f1dcb3eb46
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Reviewed by: markj
Differential Revision: https://reviews.freebsd.org/D44609
|
|
|
|
|
|
|
| |
PR: 274615
Reviewed by: ngie
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42321
|
|
|
|
|
| |
Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41512
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These tests weren't run on x86 until CI grabbed them. It turns out,
there's a sign extension bug that surfaces on x86 with char being a
signed type.
NetBSD unearthed this when they took and improved the patch, so just
grab their solution until we get to merging in the latest version of
the test.
Reported by: CI (via ngie)
Fixes: 2f489a509e61 ("libc: fix some overflow scenarios in vis(3)")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous incarnation of this would call wcrtomb() on the destination
buffer, and only check for overflow *after* it's happened.
Additionally, the conversion error / VIS_NOLOCALE path also didn't check
for overflow, and the overflow check at the end didn't account for the
fact that we still need to write a NUL terminator afterward.
Start by only doing the multibyte conversion into mbdst directly if we
have enough buffer space to guarantee it'll fit. An additional
MB_CUR_MAX buffer has been stashed on the stack to write into if we're
cutting it close at the end of the buffer, since we don't really have a
good way to determine the length of the wchar_t without just doing the
conversion. We'll do the conversion into the buffer that's guaranteed
to fit, then copy it over if the copy won't overflow.
The byte-for-byte overflow is a little bit easier, as we simply check
for overflow with each byte written and make sure we can still NUL
terminate after.
Tests added to exercise these edge cases.
Reviewed by: des
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D41328
|
|
|
|
|
|
|
|
| |
Due to unwind tables generation enabled after c969310c for csu.
PR: 241562, 246322, 246537
Reviewed by: kib, ngie
Differential Revision: https://reviews.freebsd.org/D40758
|
|
|
|
|
|
|
|
|
|
| |
- 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
|
|
|
|
|
|
|
| |
MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D38286
|
|
|
|
|
|
| |
Sponsored by: Klara, Inc.
Reviewed by: ngie
Differential Revision: https://reviews.freebsd.org/D38177
|
|
|
|
|
|
|
|
|
|
|
| |
These architectures fail to handle this special case, and will cause the
corresponding setjmp/_setjmp to return 0 rather than 1. Fix this and add
regression tests (also committed upstream).
PR: 268684
Reviewed by: arichardson, jhb
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D29363
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
fgetln() returns a pointer to an array of characters that is 'len'
characters long, not 'len + 1'. While here, overwriting the contents
of the buffer returned by fgetln isn't really safe, so switch to using
getline() instead.
Note that these fixes are a subset of those applied to a
near-identical copy of this function in libc's resolv_test.c in commit
2afeaad315ac19450389b8f2befdbe7c91c37818.
Reviewed by: ngie
Reported by: CHERI (buffer overflow)
Sponsored by: DARPA
Differential Revision: https://reviews.freebsd.org/D37886
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the msg and shm tests, if the child exited before the parent
entered sigsuspend(), the test would hang and time out. This was
also a problem in the sem test, but the misuse of atf_tc_pass()
masked it. Adding a short sleep before the sigsuspend() calls made
the hang 100% reliable. With the same sleep in the new version,
the test passes reliably.
Remove calls to atf_tc_pass(). The call in the sem test broke the test
by exiting prematurely, after only one child out of five had finished.
The other two were harmless but unhelpful.
Reduce a one-second sleep to a more reasonable duration so I can quickly
run many iterations of the test.
Where feasible, assert that wait() returns the child PID. While I'm here,
use the more succinct ATF_REQUIRE* instead of if/atf_tc_fail/else.
Flush stdout before forking to avoid double-flush.
Use errx() when errno is irrelevant.
Don't use ATF_REQUIRE* in children. Apparently, the output doesn't
get saved. The exit status works, so it fails correctly, but silently.
Re-enable the test in CI.
PR: 233649
Reviewed by: markj (previous version)
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D35187
|
|
|
|
|
|
|
|
|
|
|
| |
NetBSD has an ATF test for newfs_msdos. Connect it to the build.
Adapt it for FreeBSD. This would have caught the bug fixed by my
previous commit.
Reviewed by: delphij, emaste
MFC after: 1 week
Sponsored by: Dell EMC Isilon
Differential Revision: https://reviews.freebsd.org/D34116
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
Reviewed by: kevans, ngie (previous version)
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D33143
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
|
|
|
|
| |
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
|
|
|
|
|
| |
PR: 259969
Sponsored by: The FreeBSD Foundation
|
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
| |
ATF_REQUIRE_ERRNO requires the given errno iff the given expression is
true. These test cases used it incorrectly, potentially allowing
sem_clockwait_np to succeed when it was expected to fail. Use separate
ATF calls to require failure and the expected errno.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
|
|
|
|
|
|
|
|
| |
Move these tests into individual test cases for all the usual reasons.
No functional change intended.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
|
|
|
|
|
|
|
|
|
| |
In a guest on a busy hypervisor, the time remaining after an
interrupted sleep could be much lower than other environments.
Relax the lower bound on VMs.
MFC after: 1 week
Sponsored by: Dell EMC Isilon
|
|
|
|
|
|
|
|
| |
Fix erroneous = that was meant to be ==.
Revision 1.10 from NetBSD t_wait.c
Obtained from: NetBSD
|
|
|
|
| |
Sponsored by: Netflix
|
|
|
|
|
|
|
|
|
|
|
| |
This diff primarily adds/removes flags to make the tests compatible with
sort. Two tests are removed. One test is changed to expect fail due to
a bug.
Reviewed by: markj
MFC after: 1 week
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D30217
|
|
|
|
| |
The only change needed is to mark a few variables as static.
|
|
|
|
|
|
|
|
|
|
| |
It appears that the stackframe layout can be slightly different depending on
compiler and target architecture. For example, when using CHERI LLVM for RISC-V
we can actually overflow the buffer by up to 8 bytes without SSP detecting it.
Fix this by increasing the overflow to 15 bytes.
Reviewed By: ngie, emaste
Differential Revision: https://reviews.freebsd.org/D28997
|
|
|
|
|
|
|
|
|
| |
I did this without a full vendor update since that would cause too many
conflicts. Since these files now almost match the NetBSD sources the
next git subtree merge should work just fine.
Reviewed By: lwhsu
Differential Revision: https://reviews.freebsd.org/D28797
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 above 3 to get a
deterministic fd table allocation for the child. Instead of using closefrom
(which will close the ATF output file FD) I've changed this test use
the lowest available fd and pass that to the helper program as a string.
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/D28684
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
The rpc_control() API does not accept the CLCR_SET_RPCB_TIMEOUT command,
it only accepts RPC_SVC_CONNMAXREC_GET/RPC_SVC_CONNMAXREC_SET, so it was
not doing anything.
Instead of incorrectly calling this API, use clnt_create_timed() instead.
I noticed this because the test was timing out after 120s in the CheriBSD CI.
Reviewed By: ngie
Differential Revision: https://reviews.freebsd.org/D28478
|
|
|
|
|
|
|
|
|
|
|
| |
After d3338f3355a612cf385632291f46c5777bba8d18, the lib/msun test case
'hypotl_near_underflow' would fail to compile on platforms where long
doubles weren't 80 bit, like on x86. Disable this particular test on
such platforms for now.
PR: 253313
MFC after: 1 week
X-MFC-With: d3338f3355a612cf385632291f46c5777bba8d18
|
|
|
|
|
|
|
|
|
|
|
| |
This adjusts the factor used to scale the subnormal numbers, so it
becomes the right value after adjusting its exponent. Thanks to Steve
Kargl for finding the most elegant fix.
Also enable the hypot tests, and add a test case for this bug.
PR: 253313
MFC after: 1 week
|
|
|
|
|
|
|
| |
This adds the test case to contrib/netbsd-tests/lib/libm/t_pow.c, as it
is currently the only place testing pow(3) and friends.
MFC after: 1 week
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The basic issue here is that grep, when given -m 1, would stop all
line processing once it hit the match count and exit immediately. The
problem with exiting immediately is that -A processing only happens when
subsequent lines are processed and do not match.
The fix here is relatively easy; when bsdgrep matches a line, it resets
the 'tail' of the matching context to the value supplied to -A and
dumps anything that's been queued up for -B. After the current line has
been printed and tail is reset, we check our mcount and do what's
needed. Therefore, at the time that we decide we're doing nothing, we
know that 'tail' of the context is correct and we can simply continue
on if there's still more to pick up.
With this change, we still bail out immediately if there's been no -A
flag. If -A was supplied, we signal that we should continue on. However,
subsequent lines will not even bothere to try and process the line. We
have reached the match count, so even if the next line would match then
we must process it if it hadn't. Thus, the loop in procfile() can
short-circuit and just process the line as a non-match until
procmatches() indicates that it's safe to stop.
A test has been added to reflect both that we should be picking up the
next line and that the next line should be considered a non-match even
if it should have been.
PR: 253350
MFC-after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The null pattern semantics were terrible because I tried to match gnugrep,
but I got it wrong. Let's unwind that:
- The null pattern should match every line if neither -w nor -x.
- The null pattern should match empty lines if -x.
- The null pattern should not match any lines if -w.
The first two will stop processing (shortcut) even if additional patterns
are specified. In any other case, we will continue processing other
patterns. If no other patterns are specified beside a null pattern, then
we match if neither -w nor -x or set and do not match if either of those
are specified.
The justification for -w is that it should match on a whole word, but the
null pattern deos not have a whole word to match on.
Empty pattern files should never match anything, and more importantly, -v
should cause everything to be written.
PR: 253209
MFC-after: 4 days
|