Skip to content

eBPF-based security platform

testing: skip t0007's binary case for a clang sanitized build too

Daniel Borkmann3c848b5cefcb
diff --git a/Documentation/contribute/code/developer-guide.rst b/Documentation/contribute/code/developer-guide.rst
index b03bd404..f66e1a87 100644
--- a/Documentation/contribute/code/developer-guide.rst
+++ b/Documentation/contribute/code/developer-guide.rst
@@ -466,7 +466,8 @@ the commit at ``HEAD`` alone without them.
``libtss2-tctildr``, ``libelf``, ``libz``, ``libluajit-5.1`` and
its own dynamic loader, in any version. CI runs it on the binaries
the deb and rpm operator packages install. A ``SANITIZE`` build
- fails it, because it also links the sanitizer runtimes.
+ fails it, because it also links the sanitizer runtimes or, with
+ clang, the libraries they need.
* - ``check-runtime-image.sh <binary>``
- That a runtime image of the default size of
``shirudo-gen-runtime`` holds the target binary, and how much
diff --git a/testing/ci-checks/t0007-check-operator-linkage.sh b/testing/ci-checks/t0007-check-operator-linkage.sh
index d2dccdb3..2d8b990d 100755
--- a/testing/ci-checks/t0007-check-operator-linkage.sh
+++ b/testing/ci-checks/t0007-check-operator-linkage.sh
@@ -90,13 +90,15 @@ test_expect_success 'no binary is a usage error' '
test "$rc" -eq 2
'
-# A sanitized build also links its sanitizer runtimes.
+# A sanitized build also links the sanitizer runtimes, which gcc links
+# as libraries of their own and clang into the binary, with the
+# libraries they need; the runtime's symbols are there either way.
OPERATOR=$ROOT/shirudo
HELPER=$ROOT/tools/shirudo-build/shirudo-build
if [ -x "$OPERATOR" ] && [ -x "$HELPER" ] &&
- ! readelf -dW "$OPERATOR" | grep -q 'Shared library: \[lib[a-z]*san'; then
+ ! readelf -sW "$OPERATOR" | grep -qE ' __(asan|ubsan)_'; then
test_expect_success 'the operator binaries pass' '
- check "$OPERATOR" "$HELPER"
+ sh "$S" "$OPERATOR" "$HELPER"
'
else
TAP_COUNT=$((TAP_COUNT + 1))