MFC r346539:Fix `get_int_via_sysctlbyname(..)` on JenkinsInitialize `oldlen` to the size of the value, instead of leaving the valueunitialized. Leaving it unitialized seems to work by accident o
MFC r346539:Fix `get_int_via_sysctlbyname(..)` on JenkinsInitialize `oldlen` to the size of the value, instead of leaving the valueunitialized. Leaving it unitialized seems to work by accident on amd64 whenrunning 64-bit programs, but not on i386.This matches patterns in use in other programs.PR: 237458Tested on: ^/head (amd64), ^/stable/11 (i386)
show more ...
MFC r343362,r343365,r343367,r343368,r343461,r343751,r344310:r343362:Add [initial] functional tests for sendfile(2) as lib/libc/sys/sendfileThese testcases exercise a number of functional requir
MFC r343362,r343365,r343367,r343368,r343461,r343751,r344310:r343362:Add [initial] functional tests for sendfile(2) as lib/libc/sys/sendfileThese testcases exercise a number of functional requirements for sendfile(2).The testcases use IPv4 and IPv6 domain sockets with TCP, and were confirmedfunctional on UFS and ZFS. UDP address family sockets cannot be used per thesendfile(2) contract, thus using UDP sockets is outside the scope oftesting the syscall in positive cases. As seen in`:s_negative_udp_socket_test`, UDP is used to test the sendfile(2) contractto ensure that EINVAL is returned by sendfile(2).The testcases added explicitly avoid testing out `SF_SYNC` due to thecomplexity of verifying that support. However, this is a good next logicalitem to verify.The `hdtr_positive*` testcases work to a certain degree (the headertestcases pass), but the trailer testcases do not work (it is an expectedfailure). In particular, the value received by the mock server doesn't matchthe expected value, and instead looks something like the following (usingpython array notation):`trailer[:]message[1:]`instead of:`message[:]trailer[:]`This makes me think there's a buffer overrun issue or problem with theoffset somewhere in the sendfile(2) system call, but I need to do someother testing first to verify that the code is indeed sane, and myassumptions/code isn't buggy.The `sbytes_negative` testcases that check `sbytes` being set to aninvalid value resulting in `EFAULT` fails today as the other change(which checks `copyout(9)`) has not been committed [1]. Thus, itshould remain an expected failure (see bug 232210 for more detailson this item).Next steps for testing sendfile(2):1. Fix the header/trailer testcases so that they pass.2. Setup if_tap interface and test with it, instead of using "localhost", per @asomers's suggestion.3. Handle short recv(2)'s in `server_cat(..)`.4. Add `SF_SYNC` support.5. Add some more negative tests outside the scope of the functional contract.PR: 232210r343365:Unbreak the gcc build with sendfile_test after r343362gcc 8.x is more pedantic than clang 7.x with format strings and the testspassed `void*` variables while supplying `%s` (which is technicallyincorrect).Make the affected `void*` variables use `char*` storage instead to addressthis issue, as the compiler will upcast the values to `char*`.MFC with: r343362r343367:Unbreak the build on architectures where size_t isn't synonymous with uintmax_tI should have used `%zu` instead of `%ju` with `size_t` types.MFC with: r343362, r343365Pointyhat to: ngier343368:Fix up r343367I should have only changed the format qualifier with the `size_t` value,`length`, not the other [`off_t`] value, `dest_file_size`.MFC with: r343362, r343365, r343367r343461:Fix reporting errors with `gai_strerror(..)`The return value (`err`) should be checked; not the `errno` value.PR: 235200MFC with: r343362, r343365, r343367-r343368r343751:Avoid the DNS lookup for "localhost"ci.FreeBSD.org does not have access to a DNS resolver/network (unlike my testVM), so in order for the test to pass on the host, it needs to avoid the DNSlookup by using the numeric host address representation.PR: 235200MFC with: r343362, r343365, r343367-r343368, r343461r344310:Make `server_cat(..)` handle short receivesIn short, the prior code was far too simplistic when it came to calling recv(2)and failed intermittently (or in the case of Jenkins, deterministically).Handle short recv(2)s by checking the return code and incrementing the windowinto the buffer by the number of received bytes. If the number of receivedbytes <= 0, then bail out of the loop, and test the total number of receivedbytes vs the expected number of bytes sent for equality, and base whether ornot the test passes/fails on that fact.Remove the expected failure, now that the hdtr testcases deterministically passon my host after this change [1].PR: 234809 [1], 235200Approved by: emaste (mentor, implicit: MFC to ^/stable/11 in r344977)Differential Revision: https://reviews.freebsd.org/D19523
Don't build brk_test on platforms that don't support brk().X-MFC with: r334626
Reimplement brk() and sbrk() to avoid the use of _end.Previously, libc.so would initialize its notion of the break addressusing _end, a special symbol emitted by the static linker followingthe bs
Reimplement brk() and sbrk() to avoid the use of _end.Previously, libc.so would initialize its notion of the break addressusing _end, a special symbol emitted by the static linker followingthe bss section. Compatibility issues between lld and ld.bfd couldcause the wrong definition of _end (libc.so's definition rather thanthat of the executable) to be used, breaking the brk()/sbrk()interface.Avoid this problem and future interoperability issues by simply notrelying on _end. Instead, modify the break() system call to returnthe kernel's view of the current break address, and have libcinitialize its state using an extra syscall upon the first use of theinterface. As a side effect, this appears to fix brk()/sbrk() usagein executables run with rtld direct exec, since the kernel and libc.sono longer maintain separate views of the process' break address.PR: 228574Reviewed by: kib (previous version)MFC after: 2 monthsDifferential Revision: https://reviews.freebsd.org/D15663
DIRDEPS_BUILD: Update dependencies.Sponsored by: Dell EMC Isilon
Properly set userid for truncate_test.MFC after: 1 weekSponsored by: Dell EMC Isilon
Add clock_nanosleep()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 theFreeBSD behavior o
Add clock_nanosleep()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 theFreeBSD behavior of updating rmtp only when interrupted by a signal.I believe this to be POSIX-compliant, since POSIX mentions the rmtpparameter only in the paragraph about EINTR. This is also whatLinux does. (NetBSD updates rmtp unconditionally.)Copy the whole nanosleep.2 man page from NetBSD because it is completeand closely resembles the POSIX description. Edit, polish, and reword ita bit, being sure to keep any relevant text from the FreeBSD page.Reviewed by: kib, ngie, jillesMFC after: 3 weeksRelnotes: yesSponsored by: Dell EMCDifferential Revision: https://reviews.freebsd.org/D10020
style(9): sort the #includesMFC after: 1 weekSponsored by: Dell EMC Isilon
Upgrade NetBSD tests to 01.11.2017_23.20 snapshotThis contains some new testcases in /usr/tests/...:- .../lib/libc- .../lib/libthr- .../lib/msun- .../sys/kernTested on: amd64, i386MFC after
Upgrade NetBSD tests to 01.11.2017_23.20 snapshotThis contains some new testcases in /usr/tests/...:- .../lib/libc- .../lib/libthr- .../lib/msun- .../sys/kernTested on: amd64, i386MFC after: 1 month
Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired.This uses the same fix as r294894 did for the mlock test. The code fromthat commit is moved into a common object fil
Fix setrlimit_test:setrlimit_memlock when the system has exceeded vm.max_wired.This uses the same fix as r294894 did for the mlock test. The code fromthat commit is moved into a common object file which PROGS supportsbuilding first.Sponsored by: Dell EMC IsilonDifferential Revision: https://reviews.freebsd.org/D8689
Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and addit to lib/libc/tests/sys/Makefile [*]Even though make -VPACKAGE and make -n install seem to do the right thing,the effects
Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and addit to lib/libc/tests/sys/Makefile [*]Even though make -VPACKAGE and make -n install seem to do the right thing,the effects are a bit different, depending on the build host.MFC after: 1 weekObtained from: HardenedBSD (af602f0db) [*]Reported by: Oliver Pinter <[email protected]> [*]Sponsored by: Dell EMC Isilon
Checkpoint initial integration work- Some of the lib/libc and lib/thr tests fail- lib/msun/exp_test:exp2_values now passes with clang 3.8.0The Makefiles in contrib/netbsd-tests were pruned as th
Checkpoint initial integration work- Some of the lib/libc and lib/thr tests fail- lib/msun/exp_test:exp2_values now passes with clang 3.8.0The Makefiles in contrib/netbsd-tests were pruned as they have no valueSponsored by: EMC / Isilon Storage Division
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedafter r298107Summary of changes:- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that na
Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedafter r298107Summary of changes:- Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that namespacing is kept with FILES appropriately, and that this shouldn't need to be repeated if the namespace changes -- only the definition of PACKAGE needs to be changed- Allow PACKAGE to be overridden by callers instead of forcing it to always be `tests`. In the event we get to the point where things can be split up enough in the base system, it would make more sense to group the tests with the blocks they're a part of, e.g. byacc with byacc-tests, etc- Remove PACKAGE definitions where possible, i.e. where FILES wasn't used previously.- Remove unnecessary TESTSPACKAGE definitions; this has been elided into bsd.tests.mk- Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES; ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.- Fix installation of files under data/ subdirectories in lib/libc/tests/hash and lib/libc/tests/net/getaddrinfo- Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)Document the proposed changes in share/examples/tests/tests/... via examplesso it's clear that ${PACKAGES}FILES is the suggested way forward in terms ofreplacing FILES. share/mk/bsd.README didn't seem like the appropriate methodof communicating that info.MFC after: never probablyX-MFC with: r298107PR: 209114Relnotes: yesTested with: buildworld, installworld, checkworld; buildworld, packageworldSponsored by: EMC / Isilon Storage Division
DIRDEPS_BUILD: Connect MK_TESTS.Sponsored by: EMC / Isilon Storage Division
Avoid adding the '-release' suffix to non-debug kernel packages.Sponsored by: The FreeBSD Foundation
Remove dd xfer stats emitted during buildworldThey result in gratuitous differences when comparing build log output.
Fix LDADD/DPADD that should be LIBADD.Sponsored by: EMC / Isilon Storage Division
Add some initial tests for SLIST and STAILQ macrosMFC after: 1 weekSponsored by: EMC / Isilon Storage Division
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andnetbsd-tests.test.mk (r289151)- Eliminate explicit OBJTOP/SRCTOP setting- Convert all ad hoc NetBSD test integration
Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andnetbsd-tests.test.mk (r289151)- Eliminate explicit OBJTOP/SRCTOP setting- Convert all ad hoc NetBSD test integration over to netbsd-tests.test.mk- Remove unnecessary TESTSDIR setting- Use SRCTOP where possible for clarityMFC after: 2 weeksSponsored by: EMC / Isilon Storage Divison
Enable mincore_test on arm64, we now have a working pmap_mincore.PR: 202307Obtained from: ABT Systems LtdSponsored by: The FreeBSD Foundation
On arm64 disable three tests that hang or panicEach issue has a PR open to track. This workaround allows us to run thetests to investigate the failures and avoid any new regressions.PR: 202304,
On arm64 disable three tests that hang or panicEach issue has a PR open to track. This workaround allows us to run thetests to investigate the failures and avoid any new regressions.PR: 202304, 202305, 202307Reviewed by: ngieSponsored by: The FreeBSD FoundationDifferential Revision: https://reviews.freebsd.org/D3378
Add support for makecontext. This supports up to 8 arguments as thissimplifies the code, these can be passed in registers.Obtained from: ABT Systems LtdSponsored by: The FreeBSD Foundation
Disable the tests that use makecontext on arm64, it still needs to bewritten.
Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately500 new testcasesVarious TODOs have been sprinkled around the Makefiles for items that even needto be ported (mis
Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately500 new testcasesVarious TODOs have been sprinkled around the Makefiles for items that even needto be ported (missing features), testcases have issues with building/linking, orissues at runtime.A variant of this code has been tested extensively on amd64 and i38610-STABLE/11-CURRENT for several months without issue. It builds on otherarchitectures, but the code will remain off until I have prove it works onvirtual hardware or real hardware on other architecturesIn collaboration with: pho, Casey Peel <[email protected]>Sponsored by: EMC / Isilon Storage Division