From 726f91559c124505bc40decdbab6ffff4831c8a0 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Tue, 25 Aug 2026 13:42:43 +0300 Subject: [PATCH] .github/workflows: Skip disabled regression analyzers Do not install sparse or build smatch in jobs that disable both. Check for each tool only when the corresponding analysis is enabled. --- .github/workflows/run_regression_tests.yaml | 13 +------- scripts/run-regression-tests | 36 ++++++++++----------- 2 files changed, 19 insertions(+), 30 deletions(-) diff --git a/.github/workflows/run_regression_tests.yaml b/.github/workflows/run_regression_tests.yaml index ff37db8f5..7819d5c6a 100644 --- a/.github/workflows/run_regression_tests.yaml +++ b/.github/workflows/run_regression_tests.yaml @@ -42,18 +42,7 @@ jobs: - name: Install libelf-dev run: | sudo apt-get update - sudo apt-get install -y libelf-dev libsqlite3-dev - - - name: Install sparse - run: | - sudo apt-get install sparse - - - name: Install smatch - run: | - git clone https://github.com/error27/smatch.git - cd smatch - make -j - sudo BINDIR=/bin SHAREDIR=/home/runner/share make install + sudo apt-get install -y libelf-dev - name: Run regression tests run: | diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index e99c6b12f..37674c9ac 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -637,16 +637,6 @@ fi # Regression tests # #################### -if [ "$(type -p sparse)" = "" ]; then - echo "Error: sparse has not yet been installed." - echo "See also http://www.kernel.org/pub/software/devel/sparse/." -fi - -if [ "$(type -p smatch)" = "" ]; then - echo "Error: smatch has not yet been installed." - echo "See also http://smatch.sourceforge.net/." -fi - if ! mkdir -p "${outputdir}"; then if [ -e "${outputdir}" ]; then echo "Error: path ${outputdir} exists and is not a directory." @@ -736,18 +726,28 @@ do export KCFLAGS subdirs=(drivers/scst drivers/scsi/qla2xxx) if [ "${run_sparse}" = "true" ]; then - run_sparse "$k" "${subdirs[@]}" - mv "${outputdir}/sparse-$k-output.txt" \ - "${outputdir}/sparse-$k-scst-output.txt" - if [ "${ibmvio}" = "true" ]; then - run_sparse "$k" drivers/scsi libsrp.ko scsi_sysfs.ko \ - scsi_transport_fc.ko scsi_transport_srp.ko + if [ "$(type -p sparse)" = "" ]; then + echo "Error: sparse has not yet been installed." + echo "See also http://www.kernel.org/pub/software/devel/sparse/." + else + run_sparse "$k" "${subdirs[@]}" mv "${outputdir}/sparse-$k-output.txt" \ - "${outputdir}/sparse-$k-scsi-output.txt" + "${outputdir}/sparse-$k-scst-output.txt" + if [ "${ibmvio}" = "true" ]; then + run_sparse "$k" drivers/scsi libsrp.ko scsi_sysfs.ko \ + scsi_transport_fc.ko scsi_transport_srp.ko + mv "${outputdir}/sparse-$k-output.txt" \ + "${outputdir}/sparse-$k-scsi-output.txt" + fi fi fi if [ "${run_smatch}" = "true" ]; then - run_smatch "$k" "${subdirs[@]}" + if [ "$(type -p smatch)" = "" ]; then + echo "Error: smatch has not yet been installed." + echo "See also http://smatch.sourceforge.net/." + else + run_smatch "$k" "${subdirs[@]}" + fi fi compile_kernel "$k" "${subdirs[@]}" if [ "${full_check}" = "true" ]; then