diff --git a/scripts/run-regression-tests b/scripts/run-regression-tests index cb9a4362d..b1c007b98 100755 --- a/scripts/run-regression-tests +++ b/scripts/run-regression-tests @@ -263,6 +263,7 @@ function patch_and_configure_kernel { kver="$(kernel_version "$1")" local patchfile="${outputdir}/scst-$1-kernel-matching-line-numbers.patch" local patchoutput="${outputdir}/patch-command-output-$1.txt" + local configureoutput="${outputdir}/configure-output.txt" local disable=" \ CONFIG_BINARY_PRINTF \ CONFIG_BLK_DEV_IO_TRACE \ @@ -315,7 +316,10 @@ CONFIG_X86_X32 \ ( cd "${outputdir}/linux-$1" && if [ "${multiple_patches}" = "false" ]; then - patch -p1 -f -s <"${patchfile}" >"${patchoutput}" + if ! patch -p1 -f -s <"${patchfile}" >"${patchoutput}"; then + echo "Error: applying ${patchfile} failed." + exit 1 + fi else rm -f "${patchoutput}" for p in "${outputdir}/${patchdir}"/*; do @@ -326,7 +330,11 @@ CONFIG_X86_X32 \ make -s allmodconfig &>"${outputdir}/make-config-output.txt" && for c in $disable; do sed -i.tmp "s/^$c=[ym]\$/$c=n/" .config; done && for c in $enable; do sed -i.tmp "s/^\(# \)*$c\(=.*\| is not set\)\$/$c=y/" .config; done && - make -s oldconfig /dev/null + make -s oldconfig "${configureoutput}" && + for c in $enable; do + grep -q "^$c=[ym]" .config || + echo "Enabling $c failed." + done ) } @@ -424,7 +432,7 @@ function run_smatch { kver="$(kernel_version "$1")" plevel="$(patchlevel "$1")" local outputfile="${outputdir}/smatch-$1-output.txt" - local disable="CONFIG_DYNAMIC_DEBUG" + local disable="" # "CONFIG_DYNAMIC_DEBUG" shift echo "Running smatch on the patched kernel in $* ..." @@ -675,12 +683,21 @@ do if [ "${run_checkpatch}" = "true" ]; then run_checkpatch "$k" fi - patch_and_configure_kernel "$k" + patch_and_configure_kernel "$k" || continue case "$k" in + *^*) + # CentOS. + ;; 2.*|3.*) - # Tell the kernel that we are using gcc 4.6. + # Tell the kernel that we are using gcc 4.6 since older kernel + # versions do not suppor recent gcc versions. KCFLAGS="-U__GNUC__ -U__GNUC_MINOR__ -D__GNUC__=4 -D__GNUC_MINOR__=6" esac + case "$k" in + 3.10.0-*) + # Make the CentOS 7.x build less noisy. + KCFLAGS+=" -Wno-deprecated-declarations"; + esac # See also commit bd664f6b3e37 ("disable new gcc-7.1.1 warnings for now"; # v4.13) and commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member' # warning"; v5.1).