From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on starla X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8AED21F44D for ; Mon, 25 Mar 2024 14:26:43 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=Vr0IlgLA; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 185DA385841A for ; Mon, 25 Mar 2024 14:26:42 +0000 (GMT) Received: from mail-yb1-xb30.google.com (mail-yb1-xb30.google.com [IPv6:2607:f8b0:4864:20::b30]) by sourceware.org (Postfix) with ESMTPS id BC7483858D38 for ; Mon, 25 Mar 2024 14:26:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BC7483858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org BC7483858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b30 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711376780; cv=none; b=dCXfaxKoJ1g8L1pZET1YgRcwtk2+eWMAFQUYvtn3OZSGUWUd1S0AeiJOZ2GX7DwC3M+U9R5g+wk0PLtq8yHTD1WNHeQ3JegkBbkuVAKbsDxLEEPPGgzVPfpvT73n6g4FOi3hxQALq5v5zDMHQbobhPmewMljYMxLnqn6ClInWiM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711376780; c=relaxed/simple; bh=R6uQOHPSf7sKiQGyykH/x+mR36wuLD57wE4AT6ubGlU=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=moKsa5Wg7ulJ17m63AzrNwWu98wljEZZII9NsmRhu2KQ1uIZNjRy3aDcUsUpCTILQlCm46W7znLqmPRs84GapriSc2u9D5wAtsA+wTpiqLMnq2GLn8WGm9wKmkN/DRaaafkQtEknYKEkON10cHeHo0vyL6SLiwaizAi4aXJkcWQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb30.google.com with SMTP id 3f1490d57ef6-dccb1421bdeso3887994276.1 for ; Mon, 25 Mar 2024 07:26:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711376777; x=1711981577; darn=sourceware.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=a5JrcNzRAewhL8jkcmJfMAvOC+6DekdTaKTAJyxrYMw=; b=Vr0IlgLAelx0MzCO6F+JkAqRBEjv1jwz6Ivpx4NNrtlAJCPfRmGlswnhShU1kYTu7d z7csqse5cX7E5o/xAjPxT9aY3CVG3jHuIbX1XIUieRDg20dD7CPD9jVB+iDFaFZMGxIl Hb58EDw7bVvnJ88L1C7EGAth0gEbD/NbFzVC4v6ubIi6P5qrII7VNfWtk5NRmbpYePJn J6k+zggEYN3HGqxFDVMd4fLX418Gtt4PwJpHkqjx6Qot08BlJsB0JJNvGey65RRTVNYq f+tWxymg9zaKOJAYfo01oYXZeqL/RdsErYkzPPgtnPH0P7qU4LT1l+JXLeJWGYfGmMV8 HrjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711376777; x=1711981577; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a5JrcNzRAewhL8jkcmJfMAvOC+6DekdTaKTAJyxrYMw=; b=Pzd6hB3Atd6ILwKg0jkqjYEdHxZg3E8cXPFgRwVZDEs6iB3ipaxN8A5aXfbZdv4l57 qe04dV+pe8TmKQsNX9JovSi7o8NKpgjexXcnszacTT5Q0wvEsVCcjGwJwpQr6ni8vx/H 1mYIvAgHRfPBvYkKe0SdoQx5NJy5EZASVOjRjdouzgv8S+ZJzXZrLx0ESQdsgRNV5HeT C89CUtG4P1x/58WUsdpqZ8w2QsPz3BMDQBYoKxEglg7xobPiJtqkflxDUJkAYwJNlTx7 rvbgVOJy7Rz8419qETBWFSp8PTYwkzVkTZmpE3/8wszZmEejXDEb5f4/XrdsawC68m0Z pmnQ== X-Forwarded-Encrypted: i=1; AJvYcCXrJFJ3VEswymZuhAqU++3jvvNZ8Ua43aTtdmJHq7AlQADfrFUaUxGyjBDjZZ+XjWO3Bfipjg4cK4DzYONUQdUcADAjZPSJtK4o X-Gm-Message-State: AOJu0Yy1O+sfll3+j+8UfYYiQxBtbtHWXyvmKxvMDZsmgWlBF9d1fshC bN0dabvBG6E1uNTeOCWTxmhFfIyhxanDLLMneSCbGVCI+5G35SPv/H6fD1q3cto3OwasfUUcLqA VNtJlVBvP2GS5TmDgyYYV05oM00YMoyTF X-Google-Smtp-Source: AGHT+IGdOdt63DBWtHEsJHKYFEpHVQJqrHQVkz4xTE6fg+/cfYXrtIKL7LxhaEFSFngXsNms3So80TW0MWgV20kLTEQ= X-Received: by 2002:a25:3a05:0:b0:dcd:990a:c02a with SMTP id h5-20020a253a05000000b00dcd990ac02amr4773441yba.63.1711376776984; Mon, 25 Mar 2024 07:26:16 -0700 (PDT) MIME-Version: 1.0 References: <20240321164325.539976-1-adhemerval.zanella@linaro.org> <20240321164325.539976-2-adhemerval.zanella@linaro.org> <23abf336-5490-d62d-c664-98724630bad0@redhat.com> <87v85edar3.fsf@oldenburg.str.redhat.com> <152e5240-b315-401a-8bdd-03b4be0fe35f@linaro.org> <8734sii7s3.fsf@oldenburg.str.redhat.com> <1ab96a85-a66c-45f7-9786-863cd37e5497@linaro.org> In-Reply-To: <1ab96a85-a66c-45f7-9786-863cd37e5497@linaro.org> From: "H.J. Lu" Date: Mon, 25 Mar 2024 07:25:40 -0700 Message-ID: Subject: Re: [PATCH v2 1/6] math: Add support for auto static math tests To: Adhemerval Zanella Netto Cc: Florian Weimer , Joseph Myers , libc-alpha@sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libc-alpha-bounces+e=80x24.org@sourceware.org On Mon, Mar 25, 2024 at 7:13=E2=80=AFAM Adhemerval Zanella Netto wrote: > > > > On 25/03/24 10:34, H.J. Lu wrote: > > On Fri, Mar 22, 2024 at 10:46=E2=80=AFAM Adhemerval Zanella Netto > > wrote: > >> > >> > >> > >> On 22/03/24 12:51, Florian Weimer wrote: > >>> * Adhemerval Zanella Netto: > >>> > >>>> On 22/03/24 03:46, Florian Weimer wrote: > >>>>> * Joseph Myers: > >>>>> > >>>>>> On Thu, 21 Mar 2024, Adhemerval Zanella wrote: > >>>>>> > >>>>>>> It basically copy the already in place rules for dynamic tests > >>>>>>> for auto-generated math tests for all support types. To avoid > >>>>>>> the need to duplicate .inc files, a .SECONDEXPANSION rules is > >>>>>>> adeed for the gen-libm-test.py generation. > >>>>>> > >>>>>> Running the autogenerated tests seems overly complicated when the = goal is > >>>>>> simply to verify that linking a call succeeds. > >>>>> > >>>>> Right. And I would prefer if we could mark compat/otherwise non-st= atic > >>>>> symbols in the ABI lists and use those for testing static linking. > >>>>> > >>>> > >>>> That was my first approach, but then as an experiment I enabled stat= ic > >>>> build for most of math tests and unexpectedly it has shows some fail= ures > >>>> on x86_64: > >>>> > >>>> FAIL: math/test-float64x-acos > >>>> FAIL: math/test-float64x-log10 > >>>> FAIL: math/test-float64x-log2 > >>>> FAIL: math/test-float64x-y0 > >>>> FAIL: math/test-float64x-y1 > >>>> FAIL: math/test-ldouble-acos > >>>> FAIL: math/test-ldouble-log10 > >>>> FAIL: math/test-ldouble-log2 > >>>> FAIL: math/test-ldouble-y0 > >>>> FAIL: math/test-ldouble-y1 > >>>> > >>>> $ cat math/test-float64x-acos.out > >>>> testing _Float64x (without inline functions) > >>>> Failure: acos (max_value): Exception "Overflow" set > >>>> Failure: acos (-max_value): Exception "Overflow" set > >>>> Failure: acos_downward (max_value): Exception "Overflow" set > >>>> Failure: acos_downward (-max_value): Exception "Overflow" set > >>>> Failure: acos_towardzero (max_value): Exception "Overflow" set > >>>> Failure: acos_towardzero (-max_value): Exception "Overflow" set > >>>> Failure: acos_upward (max_value): Exception "Overflow" set > >>>> Failure: acos_upward (-max_value): Exception "Overflow" set > >>>> > > > > This new static test only checks link failure. It doesn't check if the= static > > implementation is correct. We may not have more functional coverage > > for static libm in the first static libm test patch. But the first new= static > > libm tests should least expose one static libm failure on x86-64. > > The first patch is just a framework so we can selective add new static > tests, I haven't hook all of the autogenerated tests because this would > add more cpu and disk usage. > > And the test added on libm-test-funcs-*-static rules does check for > the implementation, using the default math skeleton test (including > ulp, rounding, exceptions, etc). > > > > >>>> My plan was to eventually track down what might be happening here, a= nd > >>>> the currently autogenerated tests gave me a nice scaffolding to add = coverage > >>>> tests. > >>> > >>> Interesting. On the other hand, getting --disable-shared to work and > >>> just run the *entire* test suite could provide value, too. The last > >>> time we discussed this we weren't sure if we had static-specific > >>> failures, but your example shows that we do. > >>> > >> > >> The main problem imho is --disable-shared is essentially a maintainer > >> option. Although some installed programs will be static linked, it is > >> really useful on checking if static linking is really working as expec= ted. > >> > >> And it also requires *another* build and check iteration, which duplic= ates > >> the work required in most cases (since static libraries are still buil= t > >> on default for --enable-shared). I tried to help a coworker on suppor= t the > >> --disable-shared and I recall another potential issues was the resulti= ng > >> disk usage (and thus build requirements) was quite high due glibc poor > >> organization on static build requirements. > >> > >> There also another complication where we will need to constantly add > >> $(build-shared) and duplicate the CI work to ensure both configure > >> builds are ok. > >> > >> So I really think we should phase-out --disable-shared and work toward= s > >> on add more static build tests. > > > > Agreed. We should add one static libm functional test to each libm > > functional test. With this, the static libm link tests won't be needed= . > > For this patchset only added the required one to check for symbols that > there were some regression with recent fixes. But it should be doable to > hook all tests for all symbols, although it would require some more Makef= ile > rules to hook the tgmath ones. The first patch should just add the functional tests for the missing static libm functions with Makefile changes which can be extended to cover other libm functions. > I don't have a strong opinion in fact, and I am ok on changing to Joseph'= s > suggestion to check minimal tests to check for static linking support. --=20 H.J.