From nobody Sun May 19 03:54:40 2024 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4337813BACF; Tue, 23 Apr 2024 16:26:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713889578; cv=none; b=DW/iphDyzisx11tJTwfoXK1GOrD91cJTy4m9I8arcQAXUmQXYYcTkCOG9NcPbeCqBu43/i1PULSgbKHxNisFnAKNufkAOycXvK5lj+iKraH758TROrXepb7y8Xnoyf4txUwpduFC4v9BU5gTYXYghAjjufOJbmYde1gNOcJR6jI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713889578; c=relaxed/simple; bh=+9ng6yWcOXES5QPEs42jM4ZT1hGfI9bsENNvo/ZNwIc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:To:Cc; b=AXQ4PS7MuM7pKxYeueq4LPo07mIPq2hQgla8+tS3QejjboMwcL+vBFu/V6nl9oF33ZByLKKIcHW/zWPzTGo2KzwfmmPwP760Kh8hDngbnruegsI1dI5taGDNFtrkPjRACr9o4GijvotUYdwbRDgFstG3UapDLp/UFlpULayJncM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=HHYZy9Q8; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="HHYZy9Q8" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1713889571; bh=+9ng6yWcOXES5QPEs42jM4ZT1hGfI9bsENNvo/ZNwIc=; h=From:Date:Subject:To:Cc:From; b=HHYZy9Q8DOXHgur1+vUR00rB1ngPujR6UTS1PvPOZIlsOHNwMCfSxEZ1xQPcN1QU1 jiPn+7PGQ53C3UwqIohkbG2/Fv4mN0XUeLovzyVNiu+kTj5EkkdBxDY1GddY60dq7j vUNjQSvuHQjefH8BQIYkkrr7qa1wZ7oLWSOUzyR0= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Tue, 23 Apr 2024 18:26:06 +0200 Subject: [PATCH] selftests/nolibc: run-tests.sh: use -Werror by default Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240423-nolibc-werror-v1-1-e6f0bd66eb45@weissschuh.net> X-B4-Tracking: v=1; b=H4sIAB3hJ2YC/x3MQQqAIBBG4avErBsoDYKuEi1K/2ogNEaoILx70 vJbvPdSggoSDdVLikuSxFDQ1hW5fQ4bWHwxmcZ0TWcsh3jI4viGalR2Hv1i+3Y28FSaU7HK8// GKecPL20pQl8AAAA= To: Willy Tarreau , Shuah Khan Cc: linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1713889571; l=2825; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=+9ng6yWcOXES5QPEs42jM4ZT1hGfI9bsENNvo/ZNwIc=; b=cn99pNIyqcTfzAtEGX81VZuzswRTZAHj15x8AnStCU9y57VhO0gIVeUffRIFMx++nV/7VJaJJ D7PnGm8QclfBoMY5A/A93lMZSw5svLD7lrXO0AsDnG9oz+s3Qt8KHho X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= run-tests.sh hides the output from the compiler unless the compilation fails. To recognize newly introduced warnings use -Werror by default. Also add a switch to disable -Werror in case the warnings are expected. Signed-off-by: Thomas Wei=C3=9Fschuh Acked-by: Willy Tarreau --- tools/testing/selftests/nolibc/Makefile | 2 +- tools/testing/selftests/nolibc/run-tests.sh | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/nolibc/Makefile b/tools/testing/selfte= sts/nolibc/Makefile index 40dd95228051..3fbabab46958 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -152,7 +152,7 @@ CFLAGS_mips32be =3D -EB -mabi=3D32 CFLAGS_STACKPROTECTOR ?=3D $(call cc-option,-mstack-protector-guard=3Dglob= al $(call cc-option,-fstack-protector-all)) CFLAGS ?=3D -Os -fno-ident -fno-asynchronous-unwind-tables -std=3Dc89 -W = -Wall -Wextra \ $(call cc-option,-fno-stack-protector) \ - $(CFLAGS_$(XARCH)) $(CFLAGS_STACKPROTECTOR) + $(CFLAGS_$(XARCH)) $(CFLAGS_STACKPROTECTOR) $(CFLAGS_EXTRA) LDFLAGS :=3D =20 REPORT ?=3D awk '/\[OK\][\r]*$$/{p++} /\[FAIL\][\r]*$$/{if (!f) printf("\= n"); f++; print;} /\[SKIPPED\][\r]*$$/{s++} \ diff --git a/tools/testing/selftests/nolibc/run-tests.sh b/tools/testing/se= lftests/nolibc/run-tests.sh index c0a5a7cea9fa..0446e6326a40 100755 --- a/tools/testing/selftests/nolibc/run-tests.sh +++ b/tools/testing/selftests/nolibc/run-tests.sh @@ -15,9 +15,10 @@ download_location=3D"${cache_dir}/crosstools/" build_location=3D"$(realpath "${cache_dir}"/nolibc-tests/)" perform_download=3D0 test_mode=3Dsystem +CFLAGS_EXTRA=3D"-Werror" archs=3D"i386 x86_64 arm64 arm mips32le mips32be ppc ppc64 ppc64le riscv s= 390 loongarch" =20 -TEMP=3D$(getopt -o 'j:d:c:b:a:m:ph' -n "$0" -- "$@") +TEMP=3D$(getopt -o 'j:d:c:b:a:m:peh' -n "$0" -- "$@") =20 eval set -- "$TEMP" unset TEMP @@ -40,6 +41,7 @@ Options: -a [ARCH] Host architecture of toolchains to use (default: ${hostarc= h}) -b [DIR] Build location (default: ${build_location}) -m [MODE] Test mode user/system (default: ${test_mode}) + -e Disable -Werror EOF } =20 @@ -66,6 +68,9 @@ while true; do '-m') test_mode=3D"$2" shift 2; continue ;; + '-e') + CFLAGS_EXTRA=3D"" + shift; continue ;; '-h') print_usage exit 0 @@ -153,7 +158,7 @@ test_arch() { exit 1 esac printf '%-15s' "$arch:" - swallow_output "${MAKE[@]}" "$test_target" V=3D1 + swallow_output "${MAKE[@]}" CFLAGS_EXTRA=3D"$CFLAGS_EXTRA" "$test_target"= V=3D1 cp run.out run.out."${arch}" "${MAKE[@]}" report | grep passed } --- base-commit: 0adab2b6b7336fb6ee3c6456a432dad3b1d25647 change-id: 20240423-nolibc-werror-cde7b371a2ed Best regards, --=20 Thomas Wei=C3=9Fschuh