Skip to content

eBPF-based security platform

testing: group BPM tests

John Fastabend7ea53f00ae0e
diff --git a/testing/t0019-bpm-repo-update.sh b/testing/bpm/t0019-bpm-repo-update.sh
similarity index 99%
rename from testing/t0019-bpm-repo-update.sh
rename to testing/bpm/t0019-bpm-repo-update.sh
index d8d4608a..90af645b 100755
--- a/testing/t0019-bpm-repo-update.sh
+++ b/testing/bpm/t0019-bpm-repo-update.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
WORK=$(mktemp -d)
diff --git a/testing/t0020-bpm-cli.sh b/testing/bpm/t0020-bpm-cli.sh
similarity index 99%
rename from testing/t0020-bpm-cli.sh
rename to testing/bpm/t0020-bpm-cli.sh
index c432f458..9b6e537e 100644
--- a/testing/t0020-bpm-cli.sh
+++ b/testing/bpm/t0020-bpm-cli.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
SHIRUDO=../shirudo
diff --git a/testing/t0026-bpm-info.sh b/testing/bpm/t0026-bpm-info.sh
similarity index 92%
rename from testing/t0026-bpm-info.sh
rename to testing/bpm/t0026-bpm-info.sh
index 1e9b2447..d0c37db4 100644
--- a/testing/t0026-bpm-info.sh
+++ b/testing/bpm/t0026-bpm-info.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
SHIRUDO=${SHIRUDO:-../shirudo}
diff --git a/testing/t0028-bpm-key.sh b/testing/bpm/t0028-bpm-key.sh
similarity index 94%
rename from testing/t0028-bpm-key.sh
rename to testing/bpm/t0028-bpm-key.sh
index ae8a8491..1caf67ff 100644
--- a/testing/t0028-bpm-key.sh
+++ b/testing/bpm/t0028-bpm-key.sh
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (c) 2026 Authors of shirudo
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
SHIRUDO=${SHIRUDO:-../shirudo}
diff --git a/testing/t0031-bpm-publish.sh b/testing/bpm/t0031-bpm-publish.sh
similarity index 99%
rename from testing/t0031-bpm-publish.sh
rename to testing/bpm/t0031-bpm-publish.sh
index dc82e04c..132d79ad 100644
--- a/testing/t0031-bpm-publish.sh
+++ b/testing/bpm/t0031-bpm-publish.sh
@@ -11,7 +11,7 @@
# digest against an independent recomputation of its canonical form.
# Needs clang, shirudo-build, python3 and an OpenSSL >= 3.5 (ML-DSA).
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./test-lib.sh
S=../shirudo
diff --git a/testing/t1118-bpm-tree.sh b/testing/bpm/t1118-bpm-tree.sh
similarity index 98%
rename from testing/t1118-bpm-tree.sh
rename to testing/bpm/t1118-bpm-tree.sh
index ddb22a8f..0bee6718 100755
--- a/testing/t1118-bpm-tree.sh
+++ b/testing/bpm/t1118-bpm-tree.sh
@@ -6,7 +6,7 @@
# operation, skip another by selector, and fetch only the selected upatch.
# The upatch it applies stays loaded: t1119 and t1120 continue this tree.
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./integration-lib.sh
target_guard
diff --git a/testing/t1119-bpm-tree-sequential.sh b/testing/bpm/t1119-bpm-tree-sequential.sh
similarity index 99%
rename from testing/t1119-bpm-tree-sequential.sh
rename to testing/bpm/t1119-bpm-tree-sequential.sh
index a9076b93..941c0995 100755
--- a/testing/t1119-bpm-tree-sequential.sh
+++ b/testing/bpm/t1119-bpm-tree-sequential.sh
@@ -5,7 +5,7 @@
# t1119 -- re-sync the publication t1118 applied, then follow the tree to
# the next generation and apply only the operation it appends.
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./integration-lib.sh
target_guard
diff --git a/testing/t1120-bpm-tree-delete.sh b/testing/bpm/t1120-bpm-tree-delete.sh
similarity index 99%
rename from testing/t1120-bpm-tree-delete.sh
rename to testing/bpm/t1120-bpm-tree-delete.sh
index 145b9521..7a69d9ea 100755
--- a/testing/t1120-bpm-tree-delete.sh
+++ b/testing/bpm/t1120-bpm-tree-delete.sh
@@ -5,7 +5,7 @@
# t1120 -- delete the upatch t1118 applied through an appended tree
# operation, then add it back in the generation after that.
-cd "$(dirname "$0")"
+cd "$(dirname "$0")/.."
. ./integration-lib.sh
target_guard
diff --git a/testing/run-target-tests.sh b/testing/run-target-tests.sh
index 80d3fe98..b8fe9128 100755
--- a/testing/run-target-tests.sh
+++ b/testing/run-target-tests.sh
@@ -15,9 +15,9 @@ fail=0
: "${SHIRUDO_TEST_SUITE_FAILURES_FILE:=}"
for t in \
t1200-target-fixtures.sh \
- t1118-bpm-tree.sh \
- t1119-bpm-tree-sequential.sh \
- t1120-bpm-tree-delete.sh \
+ bpm/t1118-bpm-tree.sh \
+ bpm/t1119-bpm-tree-sequential.sh \
+ bpm/t1120-bpm-tree-delete.sh \
t1102-eventlog-full.sh \
t1103-version-gate.sh \
t1104-payload-mismatch.sh \
diff --git a/testing/run-target-tree-tests.sh b/testing/run-target-tree-tests.sh
index 277bfb72..56baf3e2 100755
--- a/testing/run-target-tree-tests.sh
+++ b/testing/run-target-tree-tests.sh
@@ -11,9 +11,9 @@ cd "$(dirname "$0")"
fail=0
: "${SHIRUDO_TEST_SUITE_FAILURES_FILE:=}"
for t in \
- t1118-bpm-tree.sh \
- t1119-bpm-tree-sequential.sh \
- t1120-bpm-tree-delete.sh
+ bpm/t1118-bpm-tree.sh \
+ bpm/t1119-bpm-tree-sequential.sh \
+ bpm/t1120-bpm-tree-delete.sh
do
if sh "$t"; then
:
diff --git a/testing/run-tests.sh b/testing/run-tests.sh
index 3667f5e8..1d9cc9c7 100755
--- a/testing/run-tests.sh
+++ b/testing/run-tests.sh
@@ -41,6 +41,19 @@ for t in otel/t0[0-9][0-9][0-9]-*.sh; do
fi
done
+for t in bpm/t0[0-9][0-9][0-9]-*.sh; do
+ [ -e "$t" ] || continue
+ found=1
+ if sh "$t"; then
+ :
+ else
+ fail=$((fail + 1))
+ if [ -n "$SHIRUDO_TEST_SUITE_FAILURES_FILE" ]; then
+ printf '%s\n' "$t" >>"$SHIRUDO_TEST_SUITE_FAILURES_FILE" 2>/dev/null || :
+ fi
+ fi
+done
+
for t in upatch/kernel-obs/dns/t0[0-9][0-9][0-9]-*.sh; do
[ -e "$t" ] || continue
found=1
diff --git a/testing/t0015-test-vm-cli.sh b/testing/t0015-test-vm-cli.sh
index bda75140..72866133 100755
--- a/testing/t0015-test-vm-cli.sh
+++ b/testing/t0015-test-vm-cli.sh
@@ -901,12 +901,13 @@ test_expect_success 'make -C testing test runs the complete pipeline in order' '
test_expect_success 'operator and target runners have disjoint explicit scopes' '
grep -q "for t in t0\[0-9\]\[0-9\]\[0-9\]-\*.sh" ../testing/run-tests.sh &&
grep -q "for t in otel/t0\[0-9\]\[0-9\]\[0-9\]-\*.sh" ../testing/run-tests.sh &&
+ grep -q "bpm/t0\[0-9\]\[0-9\]\[0-9\]-\*.sh" ../testing/run-tests.sh &&
! grep -q "t1101" ../testing/run-tests.sh &&
for test_name in \
t1200-target-fixtures.sh \
- t1118-bpm-tree.sh \
- t1119-bpm-tree-sequential.sh \
- t1120-bpm-tree-delete.sh \
+ bpm/t1118-bpm-tree.sh \
+ bpm/t1119-bpm-tree-sequential.sh \
+ bpm/t1120-bpm-tree-delete.sh \
t1102-eventlog-full.sh \
t1103-version-gate.sh \
t1104-payload-mismatch.sh \