Merge pull request #20399 from mrc0mmand/test-tweaks

test: yet another fix for ASan detection
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-08-09 10:06:23 +02:00
committed by GitHub
2 changed files with 2 additions and 2 deletions
+1
View File
@@ -11,6 +11,7 @@ TEST_NO_NSPAWN=1
test_append_files() {
(
local workspace="${1:?}"
dracut_install busybox
if selinuxenabled >/dev/null; then
dracut_install selinuxenabled
+1 -2
View File
@@ -126,7 +126,6 @@ BASICTOOLS=(
base64
basename
bash
busybox
capsh
cat
chmod
@@ -229,7 +228,7 @@ is_built_with_asan() {
# Borrowed from https://github.com/google/oss-fuzz/blob/cd9acd02f9d3f6e80011cc1e9549be526ce5f270/infra/base-images/base-runner/bad_build_check#L182
local _asan_calls
_asan_calls="$(objdump -dC "$SYSTEMD_JOURNALD" | grep -E "(callq?|brasl?)\s+[^ <]+\s+<__asan" -c)"
_asan_calls="$(objdump -dC "$SYSTEMD_JOURNALD" | grep -E "(callq?|brasl?|bl)\s.+__asan" -c)"
if ((_asan_calls < 1000)); then
return 1
else