aboutsummaryrefslogtreecommitdiff
path: root/lib/libthr/tests
Commit message (Collapse)AuthorAgeFilesLines
* tests: move some files to the tests packageLexi Winter2025-05-051-0/+1
| | | | | | | | | | | | | | | | | | 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
* libthr: allow very early atfork registrationKyle Evans2024-11-141-0/+53
| | | | | | | | | | | | | | | | LSan wants to be able to register atfork handlers at __lsan_init time, which can happen either at the first intercepted function call or in a .preinit_array function. Both of these end up being very early in rtld and executed with the bind lock held, which ends up causing problems when we go to _libpthread_init(). Instead of requiring libpthread to be initialized, just insert the new atfork handler straight into the list if it's not ready yet. The critical section and locking should not be necessary if we're really executing this early, as there won't be any threads to contend with. Reviewed by: kib (earlier version), markj Differential Revision: https://reviews.freebsd.org/D47349
* libthr: add some tests for pthread_atfork() handlingKyle Evans2024-11-142-0/+228
| | | | | | | | | Test that it generally functions, and also that registering multiple times calls each handler in the order that it's documented to call them in. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D47348
* Remove residual blank line at start of MakefileWarner Losh2024-07-153-3/+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
* typo: Fix side -> size since it matters to the meaning...Warner Losh2024-06-041-1/+1
| | | | | | batch side doesn't make sense, but batch size does. Fix. Sponsored by: Netflix
* Add test for pthread_sigqueue(3)Konstantin Belousov2024-04-232-0/+121
| | | | | | | Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D44867
* lib: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+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-166-6/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* _umtx_op: fix a compat32 bug in UMTX_OP_NWAKE_PRIVATEKyle Evans2020-11-172-0/+110
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifically, if we're waking up some value n > BATCH_SIZE, then the copyin(9) is wrong on the second iteration due to upp being the wrong type. upp is currently a uint32_t**, so upp + pos advances it by twice as many elements as it should (host pointer size vs. compat32 pointer size). Fix it by just making upp a uint32_t*; it's still technically a double pointer, but the distinction doesn't matter all that much here since we're just doing arithmetic on it. Add a test case that demonstrates the problem, placed with the libthr tests since one messing with _umtx_op should be running these tests. Running under compat32, the new test case will hang as threads after the first 128 get missed in the wake. it's not immediately clear how to hit it in practice, since pthread_cond_broadcast() uses a smaller (sleepq batch?) size observed to be around ~50 -- I did not spend much time digging into it. The uintptr_t change makes no functional difference, but i've tossed it in since it's more accurate (semantically). Reported by: Andrew Gierth (andrew_tao173.riddles.org.uk, inspection) Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D27231 Notes: svn path=/head/; revision=367743
* build: provide a default WARNS for all in-tree buildsKyle Evans2020-09-183-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | The current default is provided in various Makefile.inc in some top-level directories and covers a good portion of the tree, but doesn't cover parts of the build a little deeper (e.g. libcasper). Provide a default in src.sys.mk and set WARNS to it in bsd.sys.mk if that variable is defined. This lets us relatively cleanly provide a default WARNS no matter where you're building in the src tree without breaking things outside of the tree. Crunchgen has been updated as a bootstrap tool to work on this change because it needs r365605 at a minimum to succeed. The cleanup necessary to successfully walk over this change on WITHOUT_CLEAN builds has been added. There is a supplemental project to this to list all of the warnings that are encountered when the environment has WARNS=6 NO_WERROR=yes: https://warns.kevans.dev -- this project will hopefully eventually go away in favor of CI doing a much better job than it. Reviewed by: emaste, brooks, ngie (all earlier version) Reviewed by: emaste, arichardson (depend-cleanup.sh change) Differential Revision: https://reviews.freebsd.org/D26455 Notes: svn path=/head/; revision=365887
* Use MACHINE_CPUARCH in preference MACHINE for userland.Warner Losh2017-11-071-1/+1
| | | | | | | Sponsored by: Netflix Notes: svn path=/head/; revision=325510
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-313-3/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Upgrade NetBSD tests to 01.11.2017_23.20 snapshotEnji Cooper2017-01-131-0/+1
| | | | | | | | | | | | | | | This contains some new testcases in /usr/tests/...: - .../lib/libc - .../lib/libthr - .../lib/msun - .../sys/kern Tested on: amd64, i386 MFC after: 1 month Notes: svn path=/head/; revision=312008
* Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installedEnji Cooper2016-05-043-12/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-103-0/+63
|\ | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=296625
| * DIRDEPS_BUILD: Connect MK_TESTS.Bryan Drewery2016-03-093-0/+63
| | | | | | | | | | | | | | Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=296587
* | More 'tests' bug fixes.Glen Barber2016-02-031-0/+4
| | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295182
* | First pass to fix the 'tests' packages.Glen Barber2016-02-022-0/+6
|/ | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295171
* Fix LDADD/DPADD that should be LIBADD.Bryan Drewery2015-12-043-10/+5
| | | | | | | 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-123-7/+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
* Disable the tests that use makecontext on arm64, it still needs to beAndrew Turner2015-04-271-0/+2
| | | | | | | written. Notes: svn path=/head/; revision=282091
* Add reachover Makefiles for contrib/netbsd-tests/lib/libpthread asEnji Cooper2014-11-163-0/+107
lib/libthr/tests A variant of this code has been tested on amd64/i386 for some time by EMC/Isilon on 10-STABLE/11-CURRENT. It builds on other architectures, but the code will remain off until it's proven it works on virtual hardware or real hardware on other architectures Original work by: pho Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=274578