tests: split in check, regtest and bench targets Allow make check to run without requiring build machines to use hours of CPU time. make check: short unit tests make regtest: long regression tests make bench: long benchmarks Fixes #611 Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix tests: finer-grained use of CPU_SET, CPU_ZERO and cpu_set_t Noticed build failure at https://buildd.debian.org/status/package.php?p=liburcu : Tail of log for liburcu on hurd-i386: test_urcu.c:110:0: warning: "CPU_SET" redefined [enabled by default] In file included from /usr/include/pthread/pthread.h:50:0, from /usr/include/pthread.h:2, from test_urcu.c:26: /usr/include/sched.h:80:0: note: this is the location of the previous definition make[3]: *** [test_urcu.o] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all] Error 2 dh_auto_build: make -j1 returned exit code 2 make: *** [build-arch] Error 2 dpkg-buildpackage: error: debian/rules build-arch gave error exit status 2 make[3]: Entering directory `/build/buildd-liburcu_0.7.6-1-hurd-i386-wGBAtt/liburcu-0.7.6/tests' CC test_urcu.o make[3]: Leaving directory `/build/buildd-liburcu_0.7.6-1-hurd-i386-wGBAtt/liburcu-0.7.6/tests' make[2]: Leaving directory `/build/buildd-liburcu_0.7.6-1-hurd-i386-wGBAtt/liburcu-0.7.6' Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
wfstack API: rename cds_wfs_first_blocking to cds_wfs_first cds_wfs_first never needs to block. This operation can be used to check if the stack returned by pop_all is empty or not, so it is quite interesting to have a fully non-blocking semantic for all of enqueue/pop_all/first operations. Only cds_wfs_next may block. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
wfstack test: test if number of push to empty vs pop_all match Do same as wfcqueue: we can test if number of push to empty stack match the number of pop_all that return non-empty stack. Can be tested with: ./test_urcu_wfs 5 5 10 -w Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup: cast pthread_self() return value to unsigned long pthread_t can map to other things that unsigned long (e.g. pointer). Cast it to unsigned long for debug printing and for debug delay random value purposes. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>