aboutsummaryrefslogtreecommitdiff
path: root/lib/csu/tests
Commit message (Collapse)AuthorAgeFilesLines
* csu/tests: Add tests to verify that errno == 0 upon program startupMark Johnston2025-06-243-0/+42
| | | | | Reviewed by: kib, kevans Differential Revision: https://reviews.freebsd.org/D50998
* tests: move some files to the tests packageLexi Winter2025-05-051-0/+2
| | | | | | | | | | | | | | | | | | some test support libraries had escaped confinement and were found wandering around the utilities package: /usr/tests/lib/csu/dynamiclib/libh_csu.so /usr/tests/lib/libthr/dlopen/h_pthread_dlopen.so /usr/tests/lib/libthr/dlopen/h_pthread_dlopen.so.1 /usr/tests/sys/vm/stack/libsoxstack.so these aren't built using bsd.test.mk, so they don't get the default PACKAGE=tests option; set this by hand in their Makefiles to put them back where they belong. Reviewed by: manu, des, emaste Approved by: des (mentor) Differential Revision: https://reviews.freebsd.org/D50147
* csu: drop support for GCJBrooks Davis2025-04-181-30/+0
| | | | | | | | | | | | | | | | | | | | Remove .jcr sections and related infrastructure. This has no impact on existing binaries and the toolchain remains capability of linking them, but would require different (or additional) csu files. GCC removed GCJ from trunk in on September 30, 2016. Our support came in with D17587 for compatibility with old object files. It was roughly contemporaneous with GCC 6.5, the last release with GCJ support. At this point we don't even have a compiler port capable of producing GCJ binaries so there is no need to carry this around any more. For reference see: https://en.wikipedia.org/wiki/GNU_Compiler_for_Java#History Reviewed by: kib, emaste Discussed with: imp Sponsored by: SRI International Differential Revision: https://reviews.freebsd.org/D49882
* csu tests: Remove extra slashJose Luis Duran2025-02-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Remove an extra slash that ends up in the metalog. This double slash can produce an invalid specification file if there are subdirectories down the hierarchy when sorted. For example, consider the following metalog excerpt: ./base/aaa type=dir ./base//aaa/bbb type=dir If sorted, would turn out: ./base//aaa/bbb type=dir ./base/aaa type=dir Apparently missing the ./base/aaa directory in the specification. Luckily here are no subdirectories. Reviewed by: imp, emaste Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48778
* pkgbase: fix inclusion of tests in ssh, bsnmp, clibs-devIsaac Freund2024-12-231-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, files that belong in the tests package are included in the ssh, bsnmp, and clibs-dev packages: ssh.plist 24:@dir(root,wheel,0755,) /usr/tests/secure/libexec 25:@(root,wheel,0444,) /usr/tests/secure/libexec/Kyuafile bsnmp.plist 82:@dir(root,wheel,0755,) /usr/tests/lib/libbsnmp 83:@(root,wheel,0444,) /usr/tests/lib/libbsnmp/Kyuafile 84:@(root,wheel,0555,) /usr/tests/lib/libbsnmp/bsnmpd_test clibs-dev.plist 2518:@dir(root,wheel,0755,) /usr/tests/lib/csu 2519:@(root,wheel,0444,) /usr/tests/lib/csu/Kyuafile This is caused by the PACKAGE=foo assignment in foo/Makefile.inc which overrides the default PACKAGE?=tests in bsd.test.mk. To fix this, instead use PACKAGE?=foo in foo/Makefile.inc and set PACKAGE=tests in foo/tests/Makefile. PR: 249144 Reviewed by: bapt, emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D47025
* 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
* lib: Automated cleanup of cdefs and other formattingWarner Losh2023-11-272-2/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-168-8/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-163-6/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Revert "csu: test: explicitly add libm as build parameter"Alfredo Dal'Ava Junior2022-07-282-16/+0
| | | | | | | | | This reverts commit 4f5890a0fb086324a657f3cd7ba1abc57274e0db. 9ef1127008ce94cf626daed346a3c1ee03063617 is a proper fix for the problem we tried to address. Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br)
* csu: test: explicitly add libm as build parameterAlfredo Dal'Ava Junior2022-07-072-0/+16
| | | | | | | | | | | | | CSU tests build fails with '/usr/lib/libgcc_s.so: undefined reference to fma' when built with LLVM 14 for powerpcspe, so '-lm' is being added explicitly. It may be linked to https://reviews.llvm.org/D77558 Reviewed by: imp (earlier version) MFC after: 2 days Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D35691
* Add C startup code tests for PIE binaries.John Baldwin2020-11-103-0/+13
| | | | | | | | | | | | | | | - Force dynamic to be a non-PIE binary. - Add a dynamicpie test which uses a PIE binary. Reviewed by: andrew Obtained from: CheriBSD MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27127 Notes: svn path=/head/; revision=367576
* Fix dso_handle_check for PIE executables.John Baldwin2020-11-101-2/+2
| | | | | | | | | | | | | PIE executables use crtbeginS.o and have a non-NULL dso_handle as a result. Reviewed by: andrew, emaste MFC after: 2 weeks Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D27126 Notes: svn path=/head/; revision=367575
* Revert r353140: Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it aroundKyle Evans2020-01-141-2/+0
| | | | | | | | | arichardson has an actual fix for the same issue that this was working around; given that we don't build with llvm today, go ahead and revert the workaround in advance. Notes: svn path=/head/; revision=356735
* Re-add ALLOW_MIPS_SHARED_TEXTREL, sprinkle it aroundKyle Evans2019-10-061-0/+2
| | | | | | | | | | | | Diff partially stolen from CheriBSD; these bits need -Wl,-z,notext in order to build in an LLVM world. They are needed for all flavors/sizes of MIPS. This will eventually get fixed in LLVM, but it's unclear when. Reported by: arichardson, emaste Differential Revision: https://reviews.freebsd.org/D21696 Notes: svn path=/head/; revision=353140
* Add explicit csu test dependencyEd Maste2019-01-041-0/+2
| | | | | | | | | | | | lib/csu/tests/dynamiclib requires libh_csu.so be built first. I'm not sure this is the most correct/best way to address this but it solves the issue in my testing. PR: 233734 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=342773
* Re-enable the dynamiclib tests. These should be fixed by r340910.Andrew Turner2018-11-241-1/+1
| | | | Notes: svn path=/head/; revision=340911
* Disable the dynamiclib test until a failure can be debuggedAndrew Turner2018-11-241-1/+1
| | | | Notes: svn path=/head/; revision=340881
* Build the csu tests on all architectures.Andrew Turner2018-10-301-1/+1
| | | | | | | | | | | The tests haven't been run them, but this is enough to build them so I can get feedback on if the various crt.h headers are correct. MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339916
* Disable the .preinit_array test in DSOs, ld.bfd fails to link objects withAndrew Turner2018-10-301-1/+1
| | | | | | | | | | the section. MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339913
* Fix the location of the static keyword.Andrew Turner2018-10-301-1/+1
| | | | | | | | MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339912
* Run the csu tests on a DSO. This builds the tests into a shared library,Andrew Turner2018-10-306-15/+138
| | | | | | | | | | | then runs these from the base test programs. With this we can check crtbeginS.o and crtendS.o are working as expected. MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339908
* The jcr argument to _Jv_RegisterClasses is used, stop marking it otherwise.Andrew Turner2018-10-301-1/+1
| | | | | | | | MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339907
* Check __dso_handle is NULL in non-DSO objects. It should only be non-NULLAndrew Turner2018-10-291-0/+11
| | | | | | | | | | when accessed from a shared object. MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339864
* Drop the csu tests WARNS to 5 to fix the powerpc64 build.Andrew Turner2018-10-263-2/+2
| | | | | | | | MFC with: r339738 Sponsored by: DARPA, AFRL Notes: svn path=/head/; revision=339770
* Implement a BSD licensed crtbegin/crtendAndrew Turner2018-10-258-0/+393
These are needed for .ctors/.dtors and .jcr handling. The former needs all the function pointers to be called in the correct order from the .init/.fini section. The latter just needs to call a gcj specific function if it exists with a pointer to the start of the .jcr section. This is currently disabled until __dso_handle support is added. Reviewed by: emaste MFC after: 1 month Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D17587 Notes: svn path=/head/; revision=339738