Complete REUSE support The SPDX identifiers [1] are a legally binding shorthand, which can be used instead of the full boiler plate text. This is the final step towards implementing the full REUSE spec [2] to help with copyright and licensing audits and compliance. This will reduce a lot a manual work required for the licensing audit required in Debian on each update. [1] https://spdx.org/ids-how [2] https://reuse.software/tutorial/ Change-Id: Ia014969f407043d4ac48f4a8f3639c860ca2aafb Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Build system: use SPDX identifiers The SPDX identifiers [1] are a legally binding shorthand, which can be used instead of the full boiler plate text. This is the first step towards implementing the full REUSE spec [2] to help with copyright and licensing audits and compliance. This will reduce a lot a manual work required for the licensing audit required in Debian on each update. For files that lacked copyright and licensing information, I used the following guidelines. If a clear author could be determined from the git history use it, otherwise use 'EfficiOS Inc.'. For build system files, use 'MIT', for documentation 'CC-BY-4.0' and for data files 'CC-1.0'. [1] https://spdx.org/ids-how [2] https://reuse.software/tutorial/ Change-Id: Ie507130c00b95606dc439616fda4fd9b1d35353d Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Add serialized ABI definition files This commit contains the serialized ABI definitions for a typical build of the liburcu librairies. This information is extracted using libabigail (https://sourceware.org/libabigail/). The artefacts used to generate these were built with CFLAGS="-O0 -ggdb". You can compare the serialized ABI with a shared object to check for breaking changes. For example, here we compare an in-tree built version of liburcu-memb.so with the serialized ABI of stable-0.13 : abidiff \ extras/abi/0.13/x86_64-pc-linux-gnu/liburcu-memb.so.7.xml \ src/.libs/liburcu-memb.so Change-Id: Icb3145cdf9f69490981ce201ec437cc83298f0a7 Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tests: Replace prove by autotools tap runner This patch removes the dependency on the prove perl script to run the TAP test suite. It replaces it with the autotools shell TAP driver that only requires a shell and awk. Custom arguments can be passed to the test runner with env variables as follow: env LOG_DRIVER_FLAGS='--comments --ignore-exit' \ TESTS='foo.test baz.test' make -e check This tap driver also creates a log file for each test that can then be used by another system to build a test report. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup: Re-organise source dir Re-organise the sources, add a top level "src" and "include" dir and move relevant files. Disable autotools automated includes and define them manually. This fixes problems with collision of header names with system headers. Include the autoconf config.h in the default includes and remove it where it's explicitely included. Remove _GNU_SOURCE defines since it's detected at configure for platforms that requires it and added to the config.h. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Port: Fixes to build system for portability Move our own m4 scripts to m4/. Scripts in this directory are automatically included. Make nproc command configurable. Make grep command configurable. Signed-off-by: Michael Jeanson <mjeanson@efficios.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Refactor tests - Migrate benchmarks and regression tests to tap, - Replace the "bench" make target by "short_bench" and "long_bench". The short benchmark is 3 seconds per test, and the long one is 30 seconds per test, - make regtest now invokes the benchmarks with only 1 second per benchmark. - Now use "nproc" command to detect the number of available CPUs rather than hardcoding a value. - rcutorture in "stress" mode is now executed. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fix: dynamic fallback to compat futex on sys_futex ENOSYS Some MIPS processors (e.g. Cavium Octeon II) dynamically check if the CPU supports ll/sc within sys_futex, and return a ENOSYS errno if they don't, even though the architecture implements sys_futex. Handle this situation by always building the sys_futex compatibility layer, and fall-back on it if sys_futex return a ENOSYS errno. This is a tiny compat layer which adds very little space overhead. This adds an unlikely branch on return from sys_futex, which should not be an issue performance-wise (we've already taken a system call). Since this is a fall-back mode, don't try to be clever, and don't cache the result, so that the common cases (architectures with a properly working sys_futex) don't get two conditional branches, just one. Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> CC: Michael Jeanson <mjeanson@efficios.com> CC: Jon Bernard <jbernard@debian.org>
Introduce urcu_assert and registration check Add a "registered" flag to urcu.c and urcu-qsbr.c, set/cleared when a thread is registered and unregistered. Add corresponding asserts in those functions checking if a thread is registered or unregistered more than once (which would be a bug in the way the application uses urcu). Move the checks enabled on RCU_DEBUG to a single header: urcu/debug.h. Add checks for the registered flag in RCU read-side lock functions (new urcu_assert() checks, which are only built-in if RCU_DEBUG is defined at compile-time). Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Cleanup: Check for pthread in Libc Some libc like Googles's Bionic for Android include pThread. Instead of checking for Android as in commit 58a052effb2305655ff1b7233c78ab24fc25257e this patch checks for pthread in libc as proposed by Thomas Petazzoni. Reported-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Signed-off-by: Charles Briere <charlesbriere.flatzo@gmail.com> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
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>