From c934087b627f7d368458781944f990b0eb479634 Mon Sep 17 00:00:00 2001 From: 0xb10c <0xb10c@gmail.com> Date: Thu, 3 Feb 2022 11:25:30 +0100 Subject: test: checks for tracepoint tests For testing the USDT tracepoint API in the functional tests we require: - that we are on a Linux system* - that Bitcoin Core is compiled with tracepoints - that bcc and the the Python bcc module [0] is installed - that we run the tests with the required permissions** otherwise we skip the tests. *: We currently only support tracepoints on Linux. Tracepoints are not compiled on other platforms. **: Currently, we check for root permissions via getuid == 0. It's unclear if it's even possible to run the tests a non-root user with e.g. CAP_BPF, CAP_PERFMON, and access to /sys/kernel/debug/ tracing/. Anyone running these tests as root should carefully review them first and then run them in a disposable VM. [0]: https://github.com/iovisor/bcc/blob/master/INSTALL.md --- configure.ac | 1 + 1 file changed, 1 insertion(+) (limited to 'configure.ac') diff --git a/configure.ac b/configure.ac index 222fa94946..ceb9852de0 100644 --- a/configure.ac +++ b/configure.ac @@ -1363,6 +1363,7 @@ if test "$use_usdt" != "no"; then [AC_MSG_RESULT([no]); use_usdt=no;] ) fi +AM_CONDITIONAL([ENABLE_USDT_TRACEPOINTS], [test "$use_usdt" = "yes"]) if test "$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_util$build_bitcoind$bitcoin_enable_qt$use_bench$use_tests" = "nonononononono"; then use_upnp=no -- cgit v1.2.3