From a42cce8404d09a71a656398de5ddab7a7c69d20c Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 15 Dec 2023 19:02:34 +0000 Subject: [PATCH 1/3] .github/fuzz: add -DEXTRA_CFLAGS='-Werror' -DEXTRA_CXXFLAGS='-Werror' We want to catch warnings like the incompatible pointer warning fixed by 3f572b8cb67e ("Audio: ASRC: Fix the IPC3 incompatible pointer type") Signed-off-by: Marc Herbert --- .github/workflows/build_all.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index 16aae15274e9..bd1a62792a7d 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -56,9 +56,13 @@ jobs: west init -l west update --narrow --fetch-opt=--filter=tree:0 - - name: build + # This is not fuzzing. Fuzzing just happens to require stubbing + # which provides be a great solution to compile-check many CONFIG_* + # at once. + - name: stubs build run: | cd workspace clang --verbose set -x - sof/scripts/fuzz.sh -b -- -DOVERLAY_CONFIG=stub_build_all_${{ matrix.IPC }}.conf + sof/scripts/fuzz.sh -b -- -DEXTRA_CFLAGS='-Werror' -DEXTRA_CXXFLAGS='-Werror' \ + -DOVERLAY_CONFIG=stub_build_all_${{ matrix.IPC }}.conf From aa31e7133264fd53355a3e00401fd2a0590ffe98 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 15 Dec 2023 19:00:47 +0000 Subject: [PATCH 2/3] fuzz.sh: use set -x to make the `west build ...` command visible Users want to know what exactly failed. Signed-off-by: Marc Herbert --- scripts/fuzz.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/fuzz.sh b/scripts/fuzz.sh index 47bd565d40ab..4580f64e5276 100755 --- a/scripts/fuzz.sh +++ b/scripts/fuzz.sh @@ -80,8 +80,12 @@ main() -DCONFIG_ASAN=y ) + (set -x + # When passing conflicting -DVAR='VAL UE1' -DVAR='VAL UE2' to CMake, + # the last 'VAL UE2' wins. Previous ones are silently ignored. west build -d build-fuzz -b native_posix "$SOF_TOP"/app/ -- \ "${fuzz_configs[@]}" "$@" + ) if $BUILD_ONLY; then exit 0 From ce53ae98d125e82691ba611b6de9a6132897422f Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 15 Dec 2023 19:24:27 +0000 Subject: [PATCH 3/3] Give fuzz.sh a `proper -h` help text Long overdue. Signed-off-by: Marc Herbert --- scripts/fuzz.sh | 66 ++++++++++++++++++++++++++++++++----------------- 1 file changed, 44 insertions(+), 22 deletions(-) diff --git a/scripts/fuzz.sh b/scripts/fuzz.sh index 4580f64e5276..ee3aadc96872 100755 --- a/scripts/fuzz.sh +++ b/scripts/fuzz.sh @@ -4,28 +4,50 @@ set -e print_help() { cat <