| #
1.22 |
|
18-Oct-2025 |
riastradh |
tests/lib/libpthread: Fix tests in subdirectory.
Need to use TESTS_SUBDIRS for this, not SUBDIR. Avoid the extra nesting level while here; can make the library be a subdirectory of the directory where the tests live.
PR lib/59685: libcrypto should not depend on libpthread
|
| #
1.21 |
|
06-Oct-2025 |
leot |
libpthread: append to SUBDIR instead of overwrite it
Noticed and from <riastradh>, thanks!
PR lib/59685: libcrypto should not depend on libpthread
|
| #
1.20 |
|
06-Oct-2025 |
riastradh |
libpthread: Test pthread stubs in threaded vs non-threaded programs.
PR lib/59685: libcrypto should not depend on libpthread
|
|
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
|
| #
1.19 |
|
08-Apr-2025 |
riastradh |
branches: 1.19.2; tests/lib/libpthread/t_compat_cancel: Make linker warnings non-fatal.
We will get warnings like:
/home/riastradh/netbsd/current/src/tests/lib/libpthread/t_compat_cancel.c:233: warning: warning: reference to compatibility sigsuspend(); include <signal.h> for correct reference
This is intended -- t_compat_cancel deliberately uses the compat symbols, not the modern symbols, in order to test the compat symbols.
Fixes clang build because bsd.sys.mk enables -Wl,--fatal-warnings in LDFLAGS by default.
PR lib/59240: POSIX.1-2024: cancellation point audit PR lib/59247: pthread_cancelstub.c is inadequately tested
|
| #
1.18 |
|
05-Apr-2025 |
riastradh |
Add tests for compat functions as cancellation points.
While here, test kevent too.
PR lib/59240: POSIX.1-2024: cancellation point audit PR lib/59247: pthread_cancelstub.c is inadequately tested
|
| #
1.17 |
|
31-Mar-2025 |
riastradh |
pthread_cancel(3): Add some automatic tests.
PR lib/59240: POSIX.1-2024: cancellation point audit PR lib/59134: POSIX-1.2024: pthread_setcancelstate must be async-signal-safe
|
|
Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
|
| #
1.16 |
|
24-Nov-2023 |
riastradh |
branches: 1.16.2; pthread: Add tests for pthread user stack allocation.
PR lib/57721
XXX pullup-10 XXX pullup-9 XXX pullup-8
|
|
Revision tags: netbsd-10-0-RC1 netbsd-10-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base
|
| #
1.15 |
|
21-Jun-2020 |
lukem |
branches: 1.15.6; fix build of h_thread_local_dtor.cpp
|
|
Revision tags: netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
|
| #
1.14 |
|
24-Apr-2019 |
kamil |
branches: 1.14.2; Add a complete C11 threads(3) implementation
C11 Thread support library is a portable threading C API between OSs, similar to std::threads in the C++ world.
The library is implemented as a thin shim over POSIX interfaces.
NetBSD implements the API as a part of the POSIX threading library (libpthread(3)).
C11 threads(3) are in the process of making them an integral part of the POSIX standard. The interface has been implemented in major OSs and used with stopgap libraries for older versions of them.
C11 threading library is already used (with a stopgap implementation) in the NetBSD distribution in MESA.
Original implementation by myself from 2016.
ATF tests are new and cover almost all interfaces.
Proposed on tech-userlevel@.
|
|
Revision tags: pgoyette-compat-merge-20190127 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base perseant-stdc-iso10646-base
|
| #
1.13 |
|
11-Jul-2017 |
joerg |
branches: 1.13.6; Implement __cxa_thread_atexit and __cxa_thread_atexit_impl. This functions are used for destructors of thread_local objects.
If a pending destructor exists, prevent unloading of shared objects. Introduce __dl_cxa_refcount interface for this purpose. When the last reference is gone and the object has been dlclose'd before, the unloading is finalized.
Ideally, __cxa_thread_atexit_impl wouldn't exist, but libstdc++ insists on providing __cxa_thread_atexit as direct wrapper without further patching.
|
|
Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104
|
| #
1.12 |
|
30-Oct-2016 |
kamil |
branches: 1.12.6; Add new test t_timedmutex
This test is a clone on t_mutex with additional two tests for timed-mutex specific block.
All simple-mutex (not with the timed property according to the C11 wording) specific tests are covered by pthread_mutex_timedlock(3) with parameter ts_lengthy of sufficiently large tv_sec value (right now UINT16_MAX). If, a test will hang, it won't wait UINT16_MAX seconds, but will be terminated within the default timeout for ATF tests (right now 300 [sec] in my NetBSD/amd64 setup).
This test was inspired by a classic selflock test failure of pthread_mutex_timedlock(3) of the following form:
#include <assert.h> #include <errno.h> #include <pthread.h> #include <stdio.h> #include <time.h>
int main(int argc, char **argv) { pthread_mutex_t mtx; struct timespec ts;
ts.tv_sec = 0; ts.tv_nsec = 1000; printf("ts{.tv_sec = %d, .tv_nsec=%ld}\n", ts.tv_sec, ts.tv_nsec); fflush(stdout);
printf("mtx_init\n"); assert(pthread_mutex_init(&mtx, NULL) == 0);
printf("mtx_lock\n"); assert(pthread_mutex_lock(&mtx) == 0);
printf("mtx_timedlock\n"); assert(pthread_mutex_timedlock(&mtx, &ts) == ETIMEDOUT);
printf("mtx_unlock\n"); assert(pthread_mutex_unlock(&mtx) == 0);
printf("mtx_destroy\n"); assert(pthread_mutex_destroy(&mtx) == 0);
return 0; }
Current NetBSD implementation wrongly hangs on this test.
The issue was detected during development of the C11 portable threads.
My local tests in chroot presents that the are further issues:
t_timedmutex (21/25): 10 test cases mutex1: [0.001142s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:75: *param != 20 mutex2: [0.261499s] Passed. mutex3: [0.261496s] Passed. mutex4: [0.001204s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:265: pthread_mutex_timedlock(&mutex, &ts_lengthy): Connection timed out mutex5: [0.001235s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:337: pthread_mutex_timedlock(&mutex5, &ts_lengthy): Connection timed out mutex6: [21.218497s] Failed: /usr/src/tests/lib/libpthread/t_timedmutex.c:512: start != 1 mutexattr1: [0.001328s] Passed. mutexattr2: [0.001175s] Passed. timedmutex1: [301.119397s] Failed: Test case timed out after 300 seconds timedmutex2: [301.123081s] Failed: Test case timed out after 300 seconds [623.990659s]
I'm also receiveing the same failure in the mutex6 test in t_mutex, so there might be a false positives due to local chroot(8) issues.
Commit approved by <christos>.
|
|
Revision tags: netbsd-7-2-RELEASE netbsd-7-1-2-RELEASE netbsd-7-1-1-RELEASE netbsd-7-1-RELEASE netbsd-7-1-RC2 netbsd-7-nhusb-base-20170116 netbsd-7-1-RC1 netbsd-7-0-2-RELEASE localcount-20160914 netbsd-7-nhusb-base pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base netbsd-7-0-1-RELEASE netbsd-7-0-RELEASE netbsd-7-0-RC3 netbsd-7-0-RC2 netbsd-7-0-RC1 netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base tls-maxphys-base
|
| #
1.11 |
|
12-Apr-2013 |
christos |
branches: 1.11.10; loosen the test only for qemu.
|
| #
1.10 |
|
28-Mar-2013 |
christos |
Add pthread_cond_timedwait(3) test from PR/47703
|
|
Revision tags: agc-symver-base
|
| #
1.9 |
|
21-Mar-2013 |
christos |
new dlopen tests for libpthread from manu@
|
|
Revision tags: yamt-pagecache-base8 yamt-pagecache-base7 yamt-pagecache-base6
|
| #
1.8 |
|
12-Sep-2012 |
manu |
branches: 1.8.2; setcontext() used to be incompatible with -lpthread since it affected the TLS pointer, therefore wrecking the pthread environement.
Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha) that controlled whether setcontext() would change the TLS pointer. This change let libpthread override setcontext() with its own version that unsets _UC_TLSBASE, enabling safe usage of setcontext() with -lpthread.
We also have the following required changes here: - rename alpha's _UC_UNIQUE into _UC_TLSBASE - add _UC_TLSBASE definition in header file for all ports (powerpc, sh3, sparc and sparc64 lack the implementation for now) - introduce a libc stub that can be overriden for setcontext() - modify MD libcs swapcontext() implementations so that they use the setcontext() libc stub instead of doing a plain system call.
While we are there: - document various MD _UC_* flags in header file - add libc and libpthread tests for swapcontext() behavior (hopefully helpful to spot MD problems introduced with this change)
Future work: - Deciding whether kernel support or _UC_TLSBASE should be added for powerpc, sh3, sparc and sparc64 is left to portmasters sparc64
Approved by core@
|
|
Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base
|
| #
1.7 |
|
06-Apr-2011 |
jruoho |
branches: 1.7.4; As per PR lib/44818, remove 'lib/libpthread/t_status'. It takes two minutes to rewrite this properly if someone misses this.
|
| #
1.6 |
|
24-Mar-2011 |
jruoho |
A dummy conformance-test for pthread_detach(3). I will extend this later.
|
| #
1.5 |
|
24-Mar-2011 |
jruoho |
A dummy conformance-test of pthread_equal(3).
|
|
Revision tags: bouyer-quota2-nbase bouyer-quota2-base matt-mips64-premerge-20101231
|
| #
1.4 |
|
08-Dec-2010 |
joerg |
Link t_fpu against libm if the compiler doesn't want to inline sin/cos.
|
| #
1.3 |
|
30-Nov-2010 |
joerg |
Test alignment of constructor / destructor calls as well as the stack of new threads. Currently implement for i386 and AMD64.
|
| #
1.2 |
|
28-Jul-2010 |
jruoho |
Add a simple test for pthread_join(3).
|
| #
1.1 |
|
16-Jul-2010 |
jmmv |
Convert the libpthread tests to atf. Initial work from the GSoC 2008 project by Lukasz Strzygowski.
I think that this, together with the previous conversion of librt, obsoletes the tests in the semaphore/ directory. Will investigate later.
|