aboutsummaryrefslogtreecommitdiff
path: root/libexec/rtld-elf/tests
Commit message (Collapse)AuthorAgeFilesLines
* packages: Remove the tests-dev packageLexi Winter2025-09-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't want a tests-dev package, because this means set-devel depends on tests-dev, which transitively depends on tests, which means you can't install set-devel without also getting tests. The only real "dev" files in tests-dev are from ATF (libprivateatf), so move that to its own package and add a dependency from tests. Also move Kyua to its own package, since this might be useful for running tests even when the user doesn't want the whole set of base tests installed. Add a dependency from -tests to both -atf and -kyua, and a dependency on -set-base, since the tests won't work without the full base system installed. The remaining "dev" files in tests are actually test artifacts, not real development libraries. Add a new NO_DEV_PACKAGE option to bsd.lib.mk, which causes dev files to be installed in the base package instead of creating a -dev package, and set this option for everything that installs test libraries. While here, add a slightly more informative description for the tests package. MFC after: 3 seconds Reviewed by: bapt, emaste Differential Revision: https://reviews.freebsd.org/D52597
* Remove residual blank line at start of MakefileWarner Losh2024-07-158-8/+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
* Revert "rtld: Add arm64 variant pcs tests"Andrew Turner2024-05-178-247/+0
| | | | | | It's missing an mtree update This reverts commit 9e48c30e25a743a268d17a6215b9c2d859543547.
* rtld: Add arm64 variant pcs testsAndrew Turner2024-05-178-0/+247
| | | | | | | | | | When marking a function as variant pcs we can use registers not normally used in procedure calls. Add a test that uses this and stores all general purpose registers to a buffer and compare this buffer with the expected value later. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44870
* rtld: add some dlopen testsKyle Evans2024-02-132-0/+54
| | | | | | | | | | | | | | | | | dlopen_basic just tests that libthr.so can be dlopen()ed, which will just serve as a sanity check that "libthr.so" is a thing that can be dlopened in case we get a weird failure in dlopen_recursing. dlopen_recursing tests a regression reported after the libsys split, where some dlopen() may cause infinite recursion and a resulting crash. This case is inspired by bdrewery's description of what seemed to be causing his issue. The corresponding fix landed in commit 968a18975ad ("rtld: ignore load_filtees() calls if we already [...]") Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43859
* rtld: add a test for RTLD_DEEPBINDKyle Evans2023-12-0110-2/+170
| | | | | | | | | | | This tests that with RTLD_DEEPBIND, symbols are looked up in all of the object's needed objects before the global object. PR: 275393 Reviewed by: kib Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D42843
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-166-6/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: two-line .h patternWarner Losh2023-08-167-14/+0
| | | | Remove /^\s*\*\n \*\s+\$FreeBSD\$$\n/
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-123-3/+3
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* rtld/tests: Avoid function name conflict with libc opendir()Alex Richardson2021-07-064-5/+5
| | | | | | | | This prevents these tests from being compiled with ASAN since the asan interceptors also define opendir() but matching the libc function. Reviewed By: oshogbo, kib, markj Differential Revision: https://reviews.freebsd.org/D31038
* rtld: introduce PRELOAD_FDSMariusz Zaborski2021-03-245-53/+242
| | | | | | | | | | | | | | | | | | The new PRELOAD_FDS variable accepts a list of file descriptors that should be loaded into the process. This may be used to optimize a loading process - in the case when we already have a file descriptor to the library; we don't have to look into multiple PATH to find it. It may also be used in capability mode to load a single additional library without the need to open a directory that contains it. The last use of this functionality t may be a race-free method of loading libraries. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D29334
* Do a sweep and remove most WARNS=6 settingsKyle Evans2020-10-011-1/+0
| | | | | | | | | | | | | | | 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. Notes: svn path=/head/; revision=366304
* Fix regression tests broken by r337067.Edward Tomasz Napierala2018-08-021-1/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=337124
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-313-3/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Increase WARNS for rtld-elf testsAlan Somers2017-03-113-0/+3
| | | | | | | | | | | | ATF tests have a default WARNS of 0, unlike other usermode programs. Reviewed by: ngie, julian MFC after: 3 weeks Sponsored by: Spectra Logic Corporation Differential Revision: https://reviews.freebsd.org/D9933 Notes: svn path=/head/; revision=315040
* DIRDEPS_BUILD: Add some missing dirctories to the build.Bryan Drewery2016-08-312-0/+36
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=305148
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-043-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFHGlen Barber2016-03-101-0/+19
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-091-0/+19
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | MFHGlen Barber2016-02-181-0/+1
|\| | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295734
| * Fix build race after r295643.Bryan Drewery2016-02-171-0/+1
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295683
* | First pass to fix the 'tests' packages.Glen Barber2016-02-023-0/+11
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-041-2/+1
| | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=291738
* Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) andEnji Cooper2015-10-121-1/+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
* Fix "make checkdpadd" by "spoofing" DPADDEnji Cooper2014-08-261-0/+1
| | | | | | | | | Approved by: jmmv (mentor) Phabric: D631 PR: 192769 Notes: svn path=/head/; revision=270649
* Similar to r269506, fix LIBDIR to not duplicate TESTSDIREnji Cooper2014-08-051-2/+2
| | | | | | | | | | Phabric: D536 Reviewed by: jmmv Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=269600
* Remove unnecessary .PATH directiveEnji Cooper2014-08-051-2/+0
| | | | | | | | | | | | | All of the sources for the tests are contained in the current working directory and the subdirectories Phabric: D537 Reviewed by: jmmv Approved by: jmmv (mentor) Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=269599
* Fix BINDIR to not duplicate "${TESTSDIR}Enji Cooper2014-08-041-1/+1
| | | | | | | | | | | | This should fix 'make release' with MK_TESTS != no Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Notes: svn path=/head/; revision=269506
* Move a -L argument from LDADD to LDFLAGSEnji Cooper2014-08-041-1/+3
| | | | | | | | | | Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Notes: svn path=/head/; revision=269505
* Fix a -Wsecurity warning with clangEnji Cooper2014-08-041-1/+1
| | | | | | | | | | Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Notes: svn path=/head/; revision=269504
* Remove hardcoded path to TESTSDIR (Makefile, ld_library_pathfds.c) atEnji Cooper2014-08-042-12/+11
| | | | | | | | | | | | | | | | build time by using atf_tc_get_config_var(tc, "srcdir")) This will allow end-users to move the binaries to different locations after they've been built without having to rebuild the binaries with the new paths Phabric: D525 (part of a larger patch) Reviewed by: jmmv Approved by: jmmv (co-mentor) Notes: svn path=/head/; revision=269503
* libpythagoras needs libm.Julio Merino2014-07-161-0/+3
| | | | | | | | This fixes "make tinderbox" failures on various architectures when WITH_TESTS=yes is enabled. Problem introduced in r267679. Notes: svn path=/head/; revision=268770
* Test RTLD's new LD_LIBRARY_PATH_FDS variable.Jonathan Anderson2014-06-207-0/+369
Test LD_LIBRARY_PATH_FDS by linking a binary that requires a shared library that isn't in any of the usual search paths. Ensure this fails when we don't supply LD_LIBRARY_PATH_FDS or we pass invalid information in it. Ensure it works when we pass the correct directory in various places in the variable. Approved by: rwatson (mentor) MFC after: 3 weeks Sponsored by: DARPA/AFRL Notes: svn path=/head/; revision=267679