Skip to content

Commit 9e59d21

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26592: ci: only run USDT interface tests on CirrusCI
2811f40 ci: only run USDT interface tests on CirrusCI (0xb10c) Pull request description: As mentioned in #26571, the task running the USDT interface tests fail when run in docker. cc7335e in #25528 added that the tests are run in a **VM** in Cirrus CI. Running them locally in docker containers might not work: - We use [bcc] as tracing toolkit which requires the kernel headers to compile the BPF bytecode. As docker containers use the hosts kernel and don't run their own, there is a potential for mismatches between kernel headers available in the container and the host kernel. This results in a failure loading the BPF byte code. - Privilges are required to load the BPF byte code into the kernel. Normally, the docker containers aren't run with these. - We currently use an untrusted third-party PPA to install the bpfcc-tools package on Ubuntu 22.04. Using this on a local dev system could be a security risk. To not hinder the ASan + LSan + UBSan part of the CI task, the USDT tests are disabled on non-CirrusCI runs. [bcc]: https://github.com/iovisor/bcc Top commit has no ACKs. Tree-SHA512: 7c159b59630b36d5ed927b501fa0ad6f54ff3d98d0902f975cc8122b4147a7f828175807d40a470a85f0f3b6eeb79307d3465a287dbd2f3d75b803769ad0b6e7
2 parents 4037478 + 2811f40 commit 9e59d21

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

ci/test/00_setup_env_native_asan.sh

+13-6
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,21 @@
66

77
export LC_ALL=C.UTF-8
88

9-
# We install an up-to-date 'bpfcc-tools' package from an untrusted PPA.
10-
# This can be dropped with the next Ubuntu or Debian release that includes up-to-date packages.
11-
# See the if-then in ci/test/04_install.sh too.
12-
export ADD_UNTRUSTED_BPFCC_PPA=true
9+
# Only install BCC tracing packages in Cirrus CI.
10+
if [[ "${CIRRUS_CI}" == "true" ]]; then
11+
# We install an up-to-date 'bpfcc-tools' package from an untrusted PPA.
12+
# This can be dropped with the next Ubuntu or Debian release that includes up-to-date packages.
13+
# See the if-then in ci/test/04_install.sh too.
14+
export ADD_UNTRUSTED_BPFCC_PPA=true
15+
export BPFCC_PACKAGE="bpfcc-tools"
16+
else
17+
export ADD_UNTRUSTED_BPFCC_PPA=false
18+
export BPFCC_PACKAGE=""
19+
fi
1320

1421
export CONTAINER_NAME=ci_native_asan
15-
export PACKAGES="systemtap-sdt-dev bpfcc-tools clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev"
16-
export DOCKER_NAME_TAG=ubuntu:22.04 # May not run in docker unless --enable-usdt is dropped
22+
export PACKAGES="systemtap-sdt-dev clang llvm python3-zmq qtbase5-dev qttools5-dev-tools libevent-dev bsdmainutils libboost-dev libdb5.3++-dev libminiupnpc-dev libnatpmp-dev libzmq3-dev libqrencode-dev libsqlite3-dev ${BPFCC_PACKAGE}"
23+
export DOCKER_NAME_TAG=ubuntu:22.04
1724
export NO_DEPENDS=1
1825
export GOAL="install"
1926
export BITCOIN_CONFIG="--enable-usdt --enable-zmq --with-incompatible-bdb --with-gui=qt5 CPPFLAGS='-DARENA_DEBUG -DDEBUG_LOCKORDER' --with-sanitizers=address,integer,undefined CC=clang CXX=clang++"

0 commit comments

Comments
 (0)