Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp3069622lqt; Tue, 23 Apr 2024 09:29:32 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXm7rmhK3hLhUFwl89BNuwc3967PUqih6db3fleeE/G6OupOq4GwhCvQYqw7w/UV2/1fdYMnhjTF2Fq6lWFDy3c9v212XA56oZaXMf8RA== X-Google-Smtp-Source: AGHT+IHXMd9ZbIoPhikLownfOjU6veVvddwxtXSlg/YSYEjsjqGz3tqVt4gXbZSBCWUrv/l2LLV8 X-Received: by 2002:a67:e24c:0:b0:47b:bf92:691 with SMTP id w12-20020a67e24c000000b0047bbf920691mr16535415vse.1.1713889771847; Tue, 23 Apr 2024 09:29:31 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713889771; cv=pass; d=google.com; s=arc-20160816; b=Cb2tLB6ExywFoBEo3wSCX0oXnGOHSssMfll68xMbI97ePQO73Kn1aFze68lz9Qdvck tnE0F1GL4XtCZiBA4AstCJ2uGn21kpoZqlt+Q3EWRsCixV9M0hQyGMvG844c0Yu+OnVD CLynpS5Hg8q7LGXzyr30CuFMMBHZty6zZ48sok1wg5ISFbkYNCURwGQ3G4JalrkD8blk XDDAIN3cBHV7oV1Xe63QqJZhOXMD/Ufw7Nk0I7e/UQ2ChyGo4LHxLAEURZmDoYdUsVdX cUCOQqm+G4msuhdhS0vs/Eau7kG2/FcQPN4esvdsGzvIy3ybu7K7rM2nRtL6q3pF1fEQ rj+Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:message-id:content-transfer-encoding:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:subject:date :from:dkim-signature; bh=c5nApQbJh241q/mlMe5ElH46GP50L+OxNLD7gHm9y/k=; fh=lrawtlvYUyTnD3YboMckJjmalpw48Rm60lz21Jj4CJE=; b=fpwqSyr62RamsJ2ZqjzdctSjH1CStn26RY/v6t0IEewXSjw5alp+Rk+EO5eXecxriY BFVwUJ6sIdFwnK5Ah74cWwMii9ZgViwNjDLzPcxZMoytQ/nY2zeM/9HvIgfENp0i0Jhz VJ+SSralYsilhk1f/Alst4n1VHTCzEiZjk3f2Io5X4cjX83KBbowb+ArCTi0NGqCV2LF Ap4keXYxOu89uN/Erd6I5u0f2MPcJV2bypsff8A6r05K1n2oYw9mQe1DbpFwZRM7hxrK yITVV2UGeDMT8n4SgQvP+dzIKl7gUvODFpQzlMnOcM4raHAd3B1hlDbnNFbTNmdS9Eb6 2JNw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=HHYZy9Q8; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-155571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155571-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id f6-20020a056102150600b0047bf5e456a2si932464vsv.353.2024.04.23.09.29.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 23 Apr 2024 09:29:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-155571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=HHYZy9Q8; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-155571-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-155571-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 87B3B1C21838 for ; Tue, 23 Apr 2024 16:29:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9640C13D629; Tue, 23 Apr 2024 16:26:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="HHYZy9Q8" 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 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: 8bit 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ßschuh --- 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/selftests/nolibc/Makefile index 40dd95228051..3fbabab46958 100644 --- a/tools/testing/selftests/nolibc/Makefile +++ b/tools/testing/selftests/nolibc/Makefile @@ -152,7 +152,7 @@ CFLAGS_mips32be = -EB -mabi=32 CFLAGS_STACKPROTECTOR ?= $(call cc-option,-mstack-protector-guard=global $(call cc-option,-fstack-protector-all)) CFLAGS ?= -Os -fno-ident -fno-asynchronous-unwind-tables -std=c89 -W -Wall -Wextra \ $(call cc-option,-fno-stack-protector) \ - $(CFLAGS_$(XARCH)) $(CFLAGS_STACKPROTECTOR) + $(CFLAGS_$(XARCH)) $(CFLAGS_STACKPROTECTOR) $(CFLAGS_EXTRA) LDFLAGS := REPORT ?= 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/selftests/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="${cache_dir}/crosstools/" build_location="$(realpath "${cache_dir}"/nolibc-tests/)" perform_download=0 test_mode=system +CFLAGS_EXTRA="-Werror" archs="i386 x86_64 arm64 arm mips32le mips32be ppc ppc64 ppc64le riscv s390 loongarch" -TEMP=$(getopt -o 'j:d:c:b:a:m:ph' -n "$0" -- "$@") +TEMP=$(getopt -o 'j:d:c:b:a:m:peh' -n "$0" -- "$@") eval set -- "$TEMP" unset TEMP @@ -40,6 +41,7 @@ Options: -a [ARCH] Host architecture of toolchains to use (default: ${hostarch}) -b [DIR] Build location (default: ${build_location}) -m [MODE] Test mode user/system (default: ${test_mode}) + -e Disable -Werror EOF } @@ -66,6 +68,9 @@ while true; do '-m') test_mode="$2" shift 2; continue ;; + '-e') + CFLAGS_EXTRA="" + 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=1 + swallow_output "${MAKE[@]}" CFLAGS_EXTRA="$CFLAGS_EXTRA" "$test_target" V=1 cp run.out run.out."${arch}" "${MAKE[@]}" report | grep passed } --- base-commit: 0adab2b6b7336fb6ee3c6456a432dad3b1d25647 change-id: 20240423-nolibc-werror-cde7b371a2ed Best regards, -- Thomas Weißschuh