Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp3608664rwl; Sun, 2 Apr 2023 11:05:46 -0700 (PDT) X-Google-Smtp-Source: AKy350am+RP3LhFcWRy7tPIPQ4BrHXSSdvP+Qux1sX5zKrkWHZ6z4nzdi4zrTefwdJ7TckFzeTMR X-Received: by 2002:a17:906:e294:b0:8b1:32b0:2a24 with SMTP id gg20-20020a170906e29400b008b132b02a24mr35223629ejb.47.1680458746511; Sun, 02 Apr 2023 11:05:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680458746; cv=none; d=google.com; s=arc-20160816; b=YxVs4BUuQWZ6JSRozZfPk0kb4Zu9pxLaGFRdClrzHbb27IykT+5PCoLpaww6WHE1I5 e2Mv8nWONZdH6Im2aQcM/v99+2uuV9FBmolY/lH6/cm37VZpdW3BiSEjwgohSge2jt6e cLPtjvP4VHdJ5hIqLs9rPxrHw1AMnuZKLyZb2JMCvkiJWYQSCb2bw15Yd2NCh0qSInSO npVILm/x944nTxMMsL/NdPcFQ1Qqm7STlx0tu1CzSSVo7mh60RA1JSiMSifFNqh+vEoy ShaXdN31uB9lWaRybIIybQKvOUNv1G1moIdD2oUDY2L9EBL4K0sjFcjpga1ucTpwfUhW tVCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:dkim-signature:from; bh=MUFX+ccwOUvcQw7IeIzbYrqqindOQ/EqtrySJ9qr1Us=; b=VkX38JtUcezbw7H3IsHBrZ00+t/PC7m2SbMm12boDAVwnfQsJhpM4a6c35T3mVp36Y t0R/4Pfbrh9D7JVR58lotlIM3L26lD8NwADwKzI+WL1LA9Ai3UP7Aplkm+3hgQMOfFGX wQ9dyquUXmBUe3LQJCBpQZjhNsv4YHinfzu8AU+Qz5W1TUCS4oP0+UgO0E5hf9R1uHfA 0jlRAKzv1EokrgAtKyPSu5xtmmKcoA8elA1Zv6GgM2np4VyDsYn4zbcnNzsS54EA6eMY JUeTrYcjhoobr1LamN69CbDYPABfICGk5p/WDcDK/mwHTfWoOnJZ2KyqY3lq9Ll029pk j0jw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=oMOT6TZy; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p11-20020a1709060dcb00b009307dae45d9si3094309eji.876.2023.04.02.11.05.22; Sun, 02 Apr 2023 11:05:46 -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=@weissschuh.net header.s=mail header.b=oMOT6TZy; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231363AbjDBSEu (ORCPT + 99 others); Sun, 2 Apr 2023 14:04:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230498AbjDBSEq (ORCPT ); Sun, 2 Apr 2023 14:04:46 -0400 Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC7D1526C; Sun, 2 Apr 2023 11:04:45 -0700 (PDT) From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1680458683; bh=pHLKhMFkF7gynF7dKsz0mx/ghrke0CAkg+O7mwjoO8c=; h=From:Subject:Date:To:Cc:From; b=oMOT6TZyAHkzrZo1VxtS/bIthJsYW8wUkJUp9ULS2iPukfQicfnOtZU9Zs9jxO4Zv lhELqsolT8rtnDbD4rOOXgfSmB3t35Irb50XRwczV8sZ+nH5AaPA2mtBxaqLd9/uv5 VwXQX+gtvLDvW3qOjGXqjKcQxwvYWXmlWvAZUnaI= Subject: [PATCH v3 0/4] tools/nolibc: add testcases for vfprintf Date: Sun, 02 Apr 2023 18:04:33 +0000 Message-Id: <20230328-nolibc-printf-test-v3-0-ddc79f92efd5@weissschuh.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-B4-Tracking: v=1; b=H4sIALLDKWQC/32NQQ6CMBAAv0J6dk1ZQkRP/sNwaMvWbkIK6RbUE P5u5QEeZ5LJbEooMYm6VZtKtLLwFAs0p0q5YOKTgIfCCjU2usEO4jSydTAnjtlDJsmgWxxaYx3 WdadKaI0Q2GSiCyWNyzgWOSfy/D5Oj75wYMlT+hzjFX/272NF0OAvaAePta6v+v4iFhEXlnCOl FW/7/sXkAyHQc4AAAA= To: Willy Tarreau , Shuah Khan Cc: linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1680458682; l=1453; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=pHLKhMFkF7gynF7dKsz0mx/ghrke0CAkg+O7mwjoO8c=; b=1EETe+2UjrvlGI1LlrXqhh1QmdJIW+3tsIwwwVP4B6VHuvNJfWnsUm+mVYUwrOs04R/Z6qfzX hYUI61l9STWAfQT6ifNUKMhJZC4HVGmZn9ONgRY6QIAUKR2Q4EkOV2Y X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,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 vfprintf() is complex and so far did not have proper tests. This series is based on the "dev" branch of the RCU tree. Signed-off-by: Thomas Weißschuh --- Changes in v3: - also provide and use fflush/fclose. - reject fileno(NULL). - provide compatability with buffered streams from glibc. - Link to v2: https://lore.kernel.org/r/20230328-nolibc-printf-test-v2-0-f72bdf210190@weissschuh.net Changes in v2: - Include for tests. - Implement FILE* in terms of integer pointers. - Provide fdopen() and fileno(). - Link to v1: https://lore.kernel.org/lkml/20230328-nolibc-printf-test-v1-0-d7290ec893dd@weissschuh.net/ --- 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 | 5 ++ tools/testing/selftests/nolibc/nolibc-test.c | 86 +++++++++++++++++++++++++ 5 files changed, 183 insertions(+), 27 deletions(-) --- base-commit: a63baab5f60110f3631c98b55d59066f1c68c4f7 change-id: 20230328-nolibc-printf-test-052d5abc2118 Best regards, -- Thomas Weißschuh