eBPF-based security platform
testing: fail t7005 and t7006 when bpm build fails
Daniel Borkmann49e560d4ac03
diff --git a/testing/functional/bpm/t7005-bpm-publish.sh b/testing/functional/bpm/t7005-bpm-publish.shindex 067421a4..8c854510 100644--- a/testing/functional/bpm/t7005-bpm-publish.sh+++ b/testing/functional/bpm/t7005-bpm-publish.sh@@ -90,12 +90,12 @@ export SHIRUDO_BUILD="$B" BPM_OCI_SCHEME=httpexport REGISTRY_AUTH_FILE="$WORK/absent-auth.json" NO_PROXY=127.0.0.1 no_proxy=127.0.0.1unset BPM_OCI_CA_FILE BPM_OCI_USERNAME BPM_OCI_PASSWORD-( cd "$WORK" && "$S" bpm build pkg --version 1.0.0 --keys-dir "$WORK/keys" ) \- >"$WORK/build.out" 2>&1 || {- cat "$WORK/build.out" >&2- test_skip_all "bpm build failed (clang/headers?)"-}-[ -s "$WORK/t7005-1.0.0.bee" ] || test_skip_all "bpm build produced no package"+test_expect_success 'bpm build packages the upatch with its tree metadata' '+ ( cd "$WORK" && "$S" bpm build pkg --version 1.0.0 \+ --keys-dir "$WORK/keys" ) >&2 &&+ test -s "$WORK/t7005-1.0.0.bee"+'+[ -s "$WORK/t7005-1.0.0.bee" ] || test_donePORT=$(python3 -c 'import socket; s = socket.socket(); s.bind(("127.0.0.1", 0)); print(s.getsockname()[1])')REG="$WORK/registry"diff --git a/testing/functional/bpm/t7006-policy-labels.sh b/testing/functional/bpm/t7006-policy-labels.shindex 8606e96c..67959116 100755--- a/testing/functional/bpm/t7006-policy-labels.sh+++ b/testing/functional/bpm/t7006-policy-labels.sh@@ -40,12 +40,13 @@ case "$SHB" inesacexport SHIRUDO_BUILD="$B"-( cd "$WORK" && "$S" bpm build pkg --version 1.0.0 \- --keys-dir "$WORK/keys" --vmlinux "$REPO/vendor/linux/vmlinux.h" ) \- >"$WORK/build.out" 2>&1 || {- cat "$WORK/build.out" >&2- test_skip_all "bpm build failed"-}+test_expect_success 'bpm build packages the policy-labeled upatch' '+ ( cd "$WORK" && "$S" bpm build pkg --version 1.0.0 \+ --keys-dir "$WORK/keys" \+ --vmlinux "$REPO/vendor/linux/vmlinux.h" ) >&2 &&+ test -s "$WORK/policy-labels-1.0.0.bee"+'+[ -s "$WORK/policy-labels-1.0.0.bee" ] || test_donetest_expect_success 'Beefile policy entries are carried in the signed upatch' 'tar -xOf "$WORK/policy-labels-1.0.0.bee" \