aboutsummaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
author0xb10c <0xb10c@gmail.com>2022-07-01 13:49:55 +0200
committer0xb10c <0xb10c@gmail.com>2022-07-08 19:41:58 +0200
commitcc7335edc87c6ef34429b4df94f53973db520aac (patch)
tree377fd38877f8a93ed40db41d6b65a4a73887cbd1 /.cirrus.yml
parentdba6f8234217565957e37516a0ea655f1180d99c (diff)
downloadbitcoin-cc7335edc87c6ef34429b4df94f53973db520aac.tar.xz
ci: run USDT interface test in a VM
Our CI tasks are run by CirrusCI in Docker containers in a Google Compute Engine based Kubernetes environment. These containers have limited capabilities - especially CAP_SYS_ADMIN is missing. See https://github.com/bitcoin/bitcoin/issues/23296#issuecomment-1024920845 We need elevated privileges to hook into the USDT tracepoints. We use a CirrusCI "compute_engine_instance" (a VM, not a container) where we have the required privileges. The ubunut-mininmal-2204-lts was choosen with debian-11 being an alternative. Both pack an outdated 'bpfcc-tools' package (v0.18.0) from 2020. This version prints warnings to stderr during BPF bytecode compilation, which causes our functional test runner to fail. This is fixed in newer verison. Until debian-12 or a newer Ubuntu release is avaliable as image in GCE (https://cloud.google.com/compute/docs/images/os-details), we use a third-party and untrusted PPA that releases up-to-date versions of the package. The official iovisor (authors of BCC) PPA is outdated too. An alternative would be to compile BCC from source in the CI. Co-authored-by: MacroFake <falke.marco@gmail.com>
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml14
1 files changed, 11 insertions, 3 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index fcf1200d35..0a8d3d6e6f 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -259,12 +259,20 @@ task:
MAKEJOBS: "-j4" # Avoid excessive memory use due to MSan
task:
- name: '[ASan + LSan + UBSan + integer, no depends] [jammy]'
+ name: '[ASan + LSan + UBSan + integer, no depends, USDT] [jammy]'
<< : *GLOBAL_TASK_TEMPLATE
- container:
- image: ubuntu:jammy
+ # We can't use a 'container' for the USDT interface tests as the CirrusCI
+ # containers don't have privileges to hook into bitcoind. CirrusCI uses
+ # Google Compute Engine instances: https://cirrus-ci.org/guide/custom-vms/
+ # Images can be found here: https://cloud.google.com/compute/docs/images/os-details
+ compute_engine_instance:
+ image_project: ubuntu-os-cloud
+ image: family/ubuntu-2204-lts # when upgrading, check if we can drop "ADD_UNTRUSTED_BPFCC_PPA"
+ cpu: 4
+ memory: 12G
env:
<< : *CIRRUS_EPHEMERAL_WORKER_TEMPLATE_ENV
+ HOME: /root/ # Only needed for compute_engine_instance
FILE_ENV: "./ci/test/00_setup_env_native_asan.sh"
MAKEJOBS: "-j4" # Avoid excessive memory use