From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 411E0C76196 for ; Thu, 6 Apr 2023 16:20:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8K1xPJKTYgVA8+adi1q/iLJRI4uzKJssrRxHG0Kco6w=; b=FDAyjKOPYBKAU9 ZfZAYo+N3kPS1/UGFBd9qTTQ2qx0bnnIAgSwuElTZXbnqBgkO0qN/I+GajBvhI9xHgPxdv3zRrZaW gs79uzvxMpG8L/Rjfb7RQuMKdcfZjfafBQc8aVM582pAK0+HzzK+gpLFmLXs9CJokw5D5W0ZWHRG5 HMdMCyci8bHCCZBVcogybyw4ajlkJljE3y9SZS91BwVWjIK+sm7I3BDPuU2ykGx273GpNoaMUVuKC Osxl//qdG+Wfl+VrJb476/0wEO9N6woTo947rVlxCz7r0/tkZe7i7vufBs8s5CPt8Rr7E4zZy9nxn Mw9SfaZzvnzbGZtNjwBA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkSL3-007yPX-0W; Thu, 06 Apr 2023 16:19:53 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pkSKz-007yN4-1i for linux-arm-kernel@lists.infradead.org; Thu, 06 Apr 2023 16:19:51 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id A89B4645B7; Thu, 6 Apr 2023 16:19:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4AD67C433A0; Thu, 6 Apr 2023 16:19:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680797988; bh=++zNwcSvxuvcUruv0Gya29HZho1aCqvr9WTM7oScMPk=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=KHX9RlDeOcOSZPjOEdA39fogBMLXNJUCWUwoeXThX1YV9iAO+6fchFnoB/LoP8WwI w+0tbpzOa5q2/lBrCIaBlI87IJ+3/vcf/h9gGAxsKUepkSy691HM+vckt7ZkKICgxW 03K9RpGL3JEsZG54jXV+E1pxZfCSJwcRKJoC06SYPa2re3c2C61IBK8GbZEwgXeO0m sU0CrQTC7D/jbA43E1zD35szpsQaKuRKH+sex0fUENsp0yaO3YTaB14T+a7YBe9g63 w+S1VoPkwF9LY0PizFIEA4RgkLyDLxnik2Q1Chpk2XGCufWvzDfhMtAd1AuekTDBJn AGkSvq8q7E8KA== From: Mark Brown Date: Thu, 06 Apr 2023 17:19:11 +0100 Subject: [PATCH v2 2/3] kselftest: Support nolibc MIME-Version: 1.0 Message-Id: <20230405-kselftest-nolibc-v2-2-2ac2495814b5@kernel.org> References: <20230405-kselftest-nolibc-v2-0-2ac2495814b5@kernel.org> In-Reply-To: <20230405-kselftest-nolibc-v2-0-2ac2495814b5@kernel.org> To: Shuah Khan , Catalin Marinas , Will Deacon , "Paul E. McKenney" , Willy Tarreau Cc: linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Mark Brown X-Mailer: b4 0.13-dev-00303 X-Developer-Signature: v=1; a=openpgp-sha256; l=1350; i=broonie@kernel.org; h=from:subject:message-id; bh=++zNwcSvxuvcUruv0Gya29HZho1aCqvr9WTM7oScMPk=; b=owEBbQGS/pANAwAKASTWi3JdVIfQAcsmYgBkLvEbGBPMa+8eLFOunlnQO2Bnog/OzyRVZ8UQpN5/ cpoY/2CJATMEAAEKAB0WIQSt5miqZ1cYtZ/in+ok1otyXVSH0AUCZC7xGwAKCRAk1otyXVSH0A6WB/ 95MDc2pK0/NSwOlf16ZLbXjyO1/x6E8GByQsIfG/binvjX22FR0u8nWSBDyo63QrXGXH8LgGnpG/dX iLs7g3al8Sg/EZKYhaDKelNiyEXjBmwp81lbdGUM/C+dS0a5Qhrg1SUo5sF0VgLoQs4tyAEJdb6d+N keUQZ5kKSjlfjpqKtX8JS71GF3ayw6MWD5T2OuvUHG2KT1XY5BPjQ7o7eiEsFJ2SI1oZBKnyyHOgzd bsXE89JxwbQIKULckk9wX0qEbX7kVHSpffbGHuxGxtihh126yHgG0njGnRC60W/gJ6bNZtjOM/cxnW bq0o1cqUpBow8nCFce74tvFQhztkI0 X-Developer-Key: i=broonie@kernel.org; a=openpgp; fpr=3F2568AAC26998F9E813A1C5C3F436CA30F5D8EB X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230406_091949_609767_EB806B77 X-CRM114-Status: GOOD ( 14.23 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Rather than providing headers for inclusion which replace any offered by the system nolibc is provided in the form of a header which should be added to the build via the compiler command line. In order to build with nolibc we need to not include the standard C headers, especially not stdio.h where the definitions of stdout, stdin and stderr will actively conflict with nolibc. Add an include guard which suppresses the inclusion of the standard headers when building with nolibc, allowing us to build tests using the nolibc headers. This allows us to avoid open coding of KTAP output for selftests that need to use nolibc in order to test interfaces that are controlled by libc. Signed-off-by: Mark Brown --- tools/testing/selftests/kselftest.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/testing/selftests/kselftest.h b/tools/testing/selftests/kselftest.h index 33a0dbd26bd3..829be379545a 100644 --- a/tools/testing/selftests/kselftest.h +++ b/tools/testing/selftests/kselftest.h @@ -43,11 +43,13 @@ #ifndef __KSELFTEST_H #define __KSELFTEST_H +#ifndef NOLIBC #include #include #include #include #include +#endif #ifndef ARRAY_SIZE #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0])) -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel