aboutsummaryrefslogtreecommitdiff
path: root/lib/libc/tests/net/getaddrinfo
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Mark several getaddrinfo tests as XFAIL"Enji Cooper2025-05-281-6/+0
| | | | | | This change was unreviewed and should not have been committed to :main. This reverts commit 9b37d84c87e69dabc69d818aa4d2fea718bd8b74.
* Mark several getaddrinfo tests as XFAILEnji Cooper2025-05-281-0/+6
| | | | | | | | | | | | | | | | | 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
* libc/tests: getaddrinfo_test: use VNET jails for testingK Rin2025-04-081-69/+59
|
* libc/tests: getaddrinfo_test: require root privilegesK Rin2025-04-081-0/+14
|
* libc/tests: rename t_getaddrinfo.sh to getaddrinfo_test.shK Rin2025-04-082-1/+1
| | | | This matches FreeBSD style of test names.
* libc/tests: getaddrinfo_test: test both IPv4 and IPv6 preferred policiesK Rin2025-04-0817-42/+682
|
* libc/tests: move getaddrinfo_test data to a subdirectoryK Rin2025-04-0813-7/+12
|
* libc/tests: fix couple errors for getaddrinfo_testK Rin2025-04-081-1/+2
| | | | | | - The reason our test is flaky is its dependence on ip6addrctl_policy. - While here, fix shell logic. When our diff(1) prints a diff it returns a nonzero status and this is when we want to atf_fail().
* libc/tests: copy t_getaddrinfo out from contrib/netbsd-testsK Rin2025-04-082-3/+199
| | | | It is going to be modified in next commits.
* tests: Require allow_network_access for tests needing name resolutionOlivier Cochard2025-04-021-2/+11
| | | | | | | | | | | | Tests that require working name resolution or network access now mandate that the kuya variable allow_network_access be set. PR: 285826 Reported by: ngie Reviewed by: igoro Approved by: lwhsu Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D49633
* libc/getaddrinfo(2): return EAI_AGAIN on nameserver timeoutGleb Smirnoff2025-03-281-29/+24
| | | | | | | | | | | | | A nameserver timeout is a soft failure, future attempts may succeed. Returning EAI_AGAIN is crucial for API users to tell a soft name resolution failure from negative resolution result. Before the change we would return EAI_ADDRFAMILY, which I believe, is a regression from 144361386696, and before that revision we used to return EAI_NONAME in most of the cases. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49411
* libc/tests: add getaddrinfo testGleb Smirnoff2025-03-282-0/+268
| | | | | | | | | | | | | | | | | A test suite for getaddrinfo(3) written in C. Unlike NetBSD test, this one will be mostly focused on what the API should return when something isn't good with your DNS. Test emulates bad DNS servers in resolv.conf intercepting fopen(2) and emulates downed network intercepting send(2). Initial version covers three main scenarios: all good, server(s) timed out, network down. For each scenario we test hostname with trailing dot and without, since libc resolver uses quite different code paths, sometimes even yielding with different error codes. All current error codes in the test are what our libc returns right now, meaning the test documents what we have, not what there should be. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D49410
* libc/tests: enable getaddrinfo(1) tests from NetBSDGleb Smirnoff2025-03-2813-2/+293
| | | | | | | | | | | | | | | | | | | | | | Enable running of contrib/netbsd-tests/lib/libc/net/getaddrinfo without modifications to the test program itself. However, create our own version of expected results files. They are produced from the NetBSD files, with the following list of changes: o AF_INET6 value is different, hence: s/family 24/family 28/. o SCTP result (socktype 5 protocol 132) needs to be added to many queries results. o NetBSD libc sorts multiple results first by protocol, then by address family. FreeBSD first sorts on address family, then on protocol. Some results need to be reordered. o Error strings need to be fixed: s/hostname nor servname provided, or not known/Name does not resolve/ s/ai_family not supported/Address family not recognized/ s/servname not supported for ai_socktype/\ Service was not recognized for socket type/. Reviewed by: ngie, kib Differential Revision: https://reviews.freebsd.org/D49409
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove quotes around Makefile .error/.warn/.info stringsEd Maste2022-01-221-1/+1
| | | | | | | | The text after .error et al is emitted verbatim. Reviewed by: sjg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D33904
* Re-add PACKAGE=> tests to lib/libc/tests/net/getaddrinfo/Makefile and addEnji Cooper2016-09-191-0/+2
| | | | | | | | | | | | | | | it 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 week Obtained from: HardenedBSD (af602f0db) [*] Reported by: Oliver Pinter <oliver.pinter@hardenedbsd.org> [*] Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=305961
* Don't define PACKAGE in lib/libc/tests/{iconv,net/getaddrinfo}Enji Cooper2016-09-181-2/+0
| | | | | | | | | | | | | | needlessly This is already being done by bsd.test.mk The other subdirectory Makefiles were intentionally left alone MFC after: 1 week Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=305919
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-041-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | after r298107 Summary 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 examples so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of replacing FILES. share/mk/bsd.README didn't seem like the appropriate method of communicating that info. MFC after: never probably X-MFC with: r298107 PR: 209114 Relnotes: yes Tested with: buildworld, installworld, checkworld; buildworld, packageworld Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=299094
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-121-4/+0
| | | | | | | | | | | | | | | netbsd-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 clarity MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Divison Notes: svn path=/head/; revision=289172
* Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds ↵Enji Cooper2014-11-041-0/+31
approximately 500 new testcases Various TODOs have been sprinkled around the Makefiles for items that even need to be ported (missing features), testcases have issues with building/linking, or issues at runtime. A variant of this code has been tested extensively on amd64 and i386 10-STABLE/11-CURRENT for several months without issue. It builds on other architectures, but the code will remain off until I have prove it works on virtual hardware or real hardware on other architectures In collaboration with: pho, Casey Peel <casey.peel@isilon.com> Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274075