Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3744848rwl; Sun, 2 Apr 2023 14:30:37 -0700 (PDT) X-Google-Smtp-Source: AKy350Y+Pq+c10S96orgfa5UqW2rZfJovRjexLl61pq0Cg1U1ohTtjRw2QnLaDIpeHdBpitdWR3v X-Received: by 2002:a17:906:d966:b0:7c0:e30a:d3e5 with SMTP id rp6-20020a170906d96600b007c0e30ad3e5mr32407556ejb.18.1680471037215; Sun, 02 Apr 2023 14:30:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680471037; cv=none; d=google.com; s=arc-20160816; b=WreJCd/JH5H3FHlzgL6NncOc1p9CUAOPEVgbmV7GFmFpHfHRN5h4S+K7nbYwe3y7pX WOFr8ngOsLYF4uuEtxHmbBW+s5LXXlVoNxYrPT8mG69ic4g+No5n/3HeApCaKEyaZbOr XWdS8Aa9/0mk66/2qbE3Rk3Mbxpge6207gU7jRJC6sEg4uFWbXrfFWnNCtc5Kv64qfOV th0LzRhNruwDZta+fdCuCrv6v52FaGHlBkilC3xVZ5NBB8olld3oQuVAMzxO1xOkTCR/ cht42CvtcwLDk1rFvirKteaoN3z3XUgn6CjCuzU8T1MsIZcgwXdA+imsW1+eOFZkoDZP ijZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=G7nAXONRQLnqaMn39Y1SrLuxZ3SfCP3QWyqjVKBpZk0=; b=yZXV5C3bFnZAstKxscj3EQ2Mm6p7SR2nr4MlaYC6t9gAcUKCPb11i1dK1xVbH6fxBK ray1c5M8Qx6mNjdrcYbLZzAo/eWiFgY/eegzkGc5qxHdjyaLkyFyjDgCp37pK4nsXXfA 49AhAwvrGAM5Hxes+EOVKUenAmVfj9GiyEGRYIym+OnCF5Jvplq+mcZfsx0diCYmkiGc oBxfwTEiEgTwm1EC6O7PB8nbRltGnoBt6LEuHUXmzJSCgKhxkRxXvO4uoKKowEJk3jYx eYqOp64QpZcxcv1valuPNSuxJ4aPHJqUP6KlLR38YXrOHIzahTlwPfVxxN4PRtrbGqu/ dUXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kv3zRQVR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w18-20020a170906d21200b009236b7f4417si6009322ejz.527.2023.04.02.14.30.02; Sun, 02 Apr 2023 14:30:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=kv3zRQVR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230261AbjDBVYL (ORCPT + 99 others); Sun, 2 Apr 2023 17:24:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59730 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229448AbjDBVYJ (ORCPT ); Sun, 2 Apr 2023 17:24:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9F1709EC5 for ; Sun, 2 Apr 2023 14:24:08 -0700 (PDT) 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 ams.source.kernel.org (Postfix) with ESMTPS id E4732B80FF2 for ; Sun, 2 Apr 2023 21:24:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CD62C433EF; Sun, 2 Apr 2023 21:24:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680470645; bh=Bhk1NvODXF0op6yKbbwQDWwfvsZ2GC/kb/TLI3m77WU=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=kv3zRQVRlz1Q56x/WOcUzlPQRyORSFN9BZMhR1BzBE0+WQJqNgEPb+/9un214z0W3 bjjKWduSO5zZcKe0p9+DpI801DqD84vDXY8x5+FjpAgRZdf2WfFQErEHNUKZqzBLxN QUKI1FOCcec7BiUoBLyA7iZHjc+k//Eu6CsEwYCeltRycGUh1VdK1GnONb2rZcH6Xc EsM917QQplbQu0ppcEBQGBk0E2IVC4lLPaqGRNnofWl9MLBFVTx8Kl++GsPJAOwcJp IcZRZaPPfxx1VnQAbZEat3LQ752dE5yWdCjTE2v+9F6+aZswTpRIhDRIwczmzK1z/K BW8kbBoSeS0gQ== Received: by paulmck-ThinkPad-P72.home (Postfix, from userid 1000) id D5829154047C; Sun, 2 Apr 2023 14:24:04 -0700 (PDT) Date: Sun, 2 Apr 2023 14:24:04 -0700 From: "Paul E. McKenney" To: Willy Tarreau Cc: linux@weissschuh.net, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/4] tools/nolibc: add testcases for vfprintf Message-ID: <530708ce-92af-41ad-84da-a691a518852b@paulmck-laptop> Reply-To: paulmck@kernel.org References: <20230402184806.12440-1-w@1wt.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230402184806.12440-1-w@1wt.eu> X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Apr 02, 2023 at 08:48:02PM +0200, Willy Tarreau wrote: > Hello Paul, > > Thomas added new tests for vfprintf(), which is a good idea because it > was a new implementation, we use it a lot in the tests so we'd rather > make sure it works! This required to implement support for memfd_create() > that is used to collect the output into a buffer, as well as to complete > a little bit the minimalistic FILE emulation with fileno(), fdopen(), > fflush() and fclose(). The result is neat and works equally on glibc and > nolibc. We just had to cheat on the pointer test because for NULL nolibc > prints "0x0" while glibc prints "(nil)" so we check 0x1 instead to avoid > this special case. > > Finally Thomas added a new target to the makefile to ease building the > test against the default libc. This should help detect incompatibilities > when new features are added. > > I've tested it locally with my libc and against all supported architectures > (userland tests only), and all tests passed. > > This can be added to your dev tree for 6.5 on top of the previous series. Looks like some useful code to make testing more comprehensive, thank you both! Queued and pushed. Thanx, Paul > Thanks! > Willy > > Thomas Wei?schuh (4): > tools/nolibc: add libc-test binary > tools/nolibc: add wrapper for memfd_create > tools/nolibc: implement fd-based FILE streams > tools/nolibc: add testcases for vfprintf > > tools/include/nolibc/stdio.h | 95 ++++++++++++++------ > tools/include/nolibc/sys.h | 23 +++++ > tools/testing/selftests/nolibc/.gitignore | 1 + > tools/testing/selftests/nolibc/Makefile | 6 ++ > tools/testing/selftests/nolibc/nolibc-test.c | 86 ++++++++++++++++++ > 5 files changed, 184 insertions(+), 27 deletions(-) > > -- > 2.17.5 >