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 0FF60C76196 for ; Thu, 6 Apr 2023 14:22:10 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Sr33HF8e6CV6PveDezaezAN2pfLKuGgzjT8PAmR/Dgo=; b=ragUk5Ccs5FI2o 8uLjD8yHrrk8kQNFa6E7D2aBDhyQepXDmkSfEw36B9nHpOeeL79u5ttO4jPPja3nm/01p/8NwR5ye kKYTl+JVS03EHYBLZkWCkz8uai46D22/e2+PkvJ6LGeqnSmZb101MpWzF3BrJDzLZw8moRPqjwki5 jx2VporDHdugAoWeJSDyUMrjymRZGXn6hVwMbtByCvpVC4roYmHI//wnipRZL7jv6jUh/0Ln9zr1B MPLFSlc3OBcz3NUu18yT5XGR2CeosndmZ2QHEggpkdssdhdcjezrQALnQyi+DQl2K5vyXGLYaiwxa Lx38MvY9HpXwPD0yrnUQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkQUC-007Yx1-2k; Thu, 06 Apr 2023 14:21:12 +0000 Received: from wtarreau.pck.nerim.net ([62.212.114.60] helo=1wt.eu) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pkQU9-007YuH-02 for linux-arm-kernel@lists.infradead.org; Thu, 06 Apr 2023 14:21:11 +0000 Received: (from willy@localhost) by mail.home.local (8.17.1/8.17.1/Submit) id 336EKT7g003156; Thu, 6 Apr 2023 16:20:29 +0200 Date: Thu, 6 Apr 2023 16:20:29 +0200 From: Willy Tarreau To: Mark Brown Cc: Shuah Khan , Catalin Marinas , Will Deacon , "Paul E. McKenney" , linux-arm-kernel@lists.infradead.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/2] kselftest: Support nolibc Message-ID: References: <20230405-kselftest-nolibc-v1-0-63fbcd70b202@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230405-kselftest-nolibc-v1-0-63fbcd70b202@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230406_072109_420969_14E4DDC6 X-CRM114-Status: GOOD ( 13.08 ) 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 Hi Mark, On Thu, Apr 06, 2023 at 02:56:28PM +0100, Mark Brown wrote: > At present the kselftest header can't be used with nolibc since it makes > use of vprintf() which is not available in nolibc and seems like it would > be inappropriate to implement given the minimal system requirements and > environment intended for nolibc. In fact we already have vfprintf(), and printf() is based on it, so wouldn't it just be a matter of adding vprintf() that calls vfprintf() for your case ? Maybe just something like this : static int vprintf(const char *fmt, va_list args) { return vfprintf(stdout, fmt, args); } It's possible I'm missing something, but it's also possible you didn't find vfprintf() which is why I prefer to raise my hand ;-) > This has resulted in some open coded > kselftests which use nolibc to test features that are supposed to be > controlled via libc and therefore better exercised in an environment with > no libc. Yeah that's ugly. In nolibc-test we now have two build targets so that we can more easily verify the compatibility between the default libc and nolibc, so my recommendation would be to stick to a common subset of both libcs, but not to rely on nolibc-specific stuff that could make tests harder to debug. Regards, Willy _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel