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=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,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 9D41C1F44D for ; Mon, 25 Mar 2024 14:13:49 +0000 (UTC) Authentication-Results: dcvr.yhbt.net; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=YT3L3Nen; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id BD570385841A for ; Mon, 25 Mar 2024 14:13:48 +0000 (GMT) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by sourceware.org (Postfix) with ESMTPS id 224F63858D33 for ; Mon, 25 Mar 2024 14:13:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 224F63858D33 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 224F63858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711376009; cv=none; b=qL6Y79NmkUoN5NU9+2mVcsmQqZNrszy1u2kW1tdHpQ37brtmkSy5WL4uSPEznJnAcMcOTMHU/9BdQ0IE1b6hsQ8qHG3aL6ufs09o1G3SFjWEaAwK/mNqIQKrBk+UC5PRQEmGaNfNuqw0bgx/BS1XMKmjEfv41bSdF6pPzSURsc4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711376009; c=relaxed/simple; bh=29jO6KXwB47qxRSl7qhzv0CrkNnkNnVGsxH2bfxPQLc=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=DofvwqDcF8kB0c15WSHzIAwQk77W1LF53e3eUC1He2LdUB9h4K5T1xUwsSblGDYZGM0jJbhdhhEe9q4edT5ujZmAdsnjKEQk+9tySP/3vjA2F/Wg/Iee/cFHrLi7176WGjrrE/VlZhfMI30vciqJ39H7XrtXQOPPUe9bvNEfqKw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1e0d654590bso2710915ad.2 for ; Mon, 25 Mar 2024 07:13:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711376006; x=1711980806; darn=sourceware.org; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=LDE4hejsMIxqVKj3SKoSg6Xckyxfgk+vowsGE4m87a0=; b=YT3L3NenWoy71W8dRHLBlGvU40QuCEB1W0EYxWuLI4Eh1qu4SjNxsnQCV+WfVSIzti ha7wL2iVF/vedOBOEuNnycSX57ZY5LNE7WfgVJTUBsM1ums5WWX2coPxSsBsh8viDW56 KOPseHyoBNa8T4XEmByBpLtUZ262RLG4L8EgQx5d2HvoVHMouj2oCHHi7XRy24+k3Jj5 03M2nVs4BkF1Gg3VTaPR3HSNZ/LKFPfFZDOPha9liCk6JfRr98542kHP0ZMBHEt+5U8p 3BzOiOHy86oO+m66qhOGDZn/07MMMA6V9EBP2O96/atYQt88Yb70AOJJZEAA8Zx98nWE IAAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711376006; x=1711980806; h=content-transfer-encoding:in-reply-to:organization:from:references :cc:to:content-language:subject:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=LDE4hejsMIxqVKj3SKoSg6Xckyxfgk+vowsGE4m87a0=; b=KwYn2+hfdYjydJL1MgmfF/3Iy47rPyJRe0n3wuHUPqEOCCTGszpuNFso8+6KA9dwio C6oe9cUudrYj1PUy9qjZi/B0Fi8YHLqHXBoxEPZyD04f+QaLqGJ7wgHFqnp6x9fRNp3I gsjWHsnyM4+ByqbH4AdXxfm8WFX0M7r+hyGiQ2sg9zFNSs5irTmp7IorbSBEWXnJbOgC qSB20jjYHgjJagsF80+sRNLwuLi/BUE5qgYIAsRNAWbBebzQrQ1/eoLsQtf3HwC8D8hC gplkvvBlxBoyZmXqkYK4/q4MkMVaGl6jHjNMnwUnl9gWJgfUIJbFOqZjowBGHXwcNRcK eaxg== X-Forwarded-Encrypted: i=1; AJvYcCVDEF8k2PiwJmLOrDcRfffaye8GaiedkViUuBr9dslVzlDFT3VoiK4edIv7qt/asZaGZQ8RQzm30+vwdrewK1hoyPLDn8/Qofoq X-Gm-Message-State: AOJu0Yy6UbM1j0KwHfE5FBSMbduL4fp8tku6r2Cg6/LLFAaIxHcqtsRM 9pweZhkT3ZQEvo0/4nmiT2x5dtgy90vgYYfrEbXDDymuhrSimWgyW1leqZXAAno= X-Google-Smtp-Source: AGHT+IGtYkA0EaRzKwDDa9WIzzYw2A46w0KINUaRH61BQKD+oUCbMbcPTSkgpKyJilgg9gJAb6RguA== X-Received: by 2002:a17:903:11d2:b0:1e0:d82c:50d2 with SMTP id q18-20020a17090311d200b001e0d82c50d2mr600647plh.36.1711376005886; Mon, 25 Mar 2024 07:13:25 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c3:1d04:bc5d:8d21:f0bf:b624? ([2804:1b3:a7c3:1d04:bc5d:8d21:f0bf:b624]) by smtp.gmail.com with ESMTPSA id mp16-20020a170902fd1000b001dcc129cc2esm4707090plb.60.2024.03.25.07.13.23 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 25 Mar 2024 07:13:25 -0700 (PDT) Message-ID: <1ab96a85-a66c-45f7-9786-863cd37e5497@linaro.org> Date: Mon, 25 Mar 2024 11:13:22 -0300 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/6] math: Add support for auto static math tests Content-Language: en-US To: "H.J. Lu" Cc: Florian Weimer , Joseph Myers , libc-alpha@sourceware.org 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> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 25/03/24 10:34, H.J. Lu wrote: > On Fri, Mar 22, 2024 at 10:46 AM 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-static >>>>> symbols in the ABI lists and use those for testing static linking. >>>>> >>>> >>>> That was my first approach, but then as an experiment I enabled static >>>> build for most of math tests and unexpectedly it has shows some failures >>>> 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, and >>>> 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 expected. >> >> And it also requires *another* build and check iteration, which duplicates >> the work required in most cases (since static libraries are still built >> on default for --enable-shared). I tried to help a coworker on support the >> --disable-shared and I recall another potential issues was the resulting >> 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 towards >> 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 Makefile rules to hook the tgmath ones. 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.