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 [IPv6:2620:52:3:1:0:246e:9693:128c]) (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 8EEB31F44D for ; Mon, 25 Mar 2024 13:35:48 +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=MioyNR/A; dkim-atps=neutral Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6AB5E385840D for ; Mon, 25 Mar 2024 13:35:47 +0000 (GMT) Received: from mail-yb1-xb29.google.com (mail-yb1-xb29.google.com [IPv6:2607:f8b0:4864:20::b29]) by sourceware.org (Postfix) with ESMTPS id 047113858D33 for ; Mon, 25 Mar 2024 13:35:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 047113858D33 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 047113858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b29 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711373729; cv=none; b=S83qY/2peCbl/gFc7KF1qbGRkGrIFq2zI/lvYTjfQVJflN8AiweBPt88KNGNkm2z2OCPSHsFFqJkXktT1b9BY8lZ7u7yQbQWG1rLfIp7ZdLHA7IsIto74gNd1GEGMtXvmlpWPTLl8Mt4Bxkx9mwmEAq5ez++PVJdVH3yZCk+KeY= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1711373729; c=relaxed/simple; bh=5nvO9blEi7mkf2klOyWKG2cN98zJR1dQY1ki8xdKtrs=; h=DKIM-Signature:MIME-Version:From:Date:Message-ID:Subject:To; b=wOP7Vw5uZbxFNNl5lyI19tHzaHHD4o/P/JQdgVnaF4IYt0NAZHlSYxvwe4fRft47JUBRWn7sc3TrmOvqO9CwPP8+a2czHvVtgJn7Zz2b6pOTlXesTs1Hf6T1LVSNzAioGymN3CJWwnlM5Qf/vaPYOgn21lfkhvLPX5RSfnts38I= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-yb1-xb29.google.com with SMTP id 3f1490d57ef6-dcbcea9c261so4254056276.3 for ; Mon, 25 Mar 2024 06:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1711373726; x=1711978526; 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=inBAO7vHP/JybwzwWN7mA+IwX9N8xA/Svl/Zx6iJ4mE=; b=MioyNR/AzbPVjIZq027dPBI+I1TsL0pf99uB1jkBNnW4Iop3DRxNagmEy0EN3I5iBM YjGVr3ac47Nx5NtuukmABmiXPIoyJb/TFczl7AcHvDgSuOmlpPJJofb36PUisoGl+Uqg wx64hVCxckP7DoKMBP7kcYt3W61ycWmD82WoTRWyMZyE/y5mDbcnQHcV3iB370PkF6iG DG5hEJRxI5CtIBLiT3vTbIJiS47Y+u8PQlVYvGcbjFvZ6IO2tq21ZtpupX+KcrhVMxir N6+dSbQOW0FsVZs66/EQosBLHNE/1lP/eMbT1DSqomxr/f3w54FAOXAOPp0CL+W0q5VY t05A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711373726; x=1711978526; 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=inBAO7vHP/JybwzwWN7mA+IwX9N8xA/Svl/Zx6iJ4mE=; b=ZZ2KgO8FSxV8KTeznrmUEPbL822yhDKbk24yweXHztYImvZc7TAmP7DcrSzgkCuhKi t0B0B/sWR9LDCA609InGvxEopVhIzEIfAWT+KQ5CM9Tmi221zp1+ftMOX4SVdubtj9M7 URQ1qvvee7s3UFu4NKKxEUThcYmFuya2IlpdSVO1r0Ejz1yT3FIRldwcepgS076kqqqB OuQwLHrLs5U5Ju6YS4WxPQV/I+AugHT5xkVphLZ0M3MvZtB1QRuUx/njzZOALcETIUAE ZcUBEmVz8yXjxhGzLFwkHmSdZvzRqtwkSW9E8msJljtnYUsZPNveRA81Gy8OLPW1SFcf 7g9g== X-Forwarded-Encrypted: i=1; AJvYcCXXsNtiRdFvaUoEpf9orr8SJT6DM18DuvyZhdXscE+k0o1OOqDmRLk6UITmb0BNxoiPh/3Y1enq+VZFJZdzs9b+bdARdMSSQQN5 X-Gm-Message-State: AOJu0YwM3ppwCsVwRMRwQhnfs9r9qZ8D8dNckier1Np6gnRcMiIoZUuW k/886vzvjOaKjLkW59/4CdltqTEpIznQgGmcySm5m2q7+bal5io6oY4vZxF0u0/EYatC9hnGYEO CXQe4ysVWAECihXMHhnkWIPRM1Ek= X-Google-Smtp-Source: AGHT+IFyiH65TZFEV9sXcxm1xH9mKp43th8jYUpaPga+3MzCvI3h2Mqn7YYkdKCLeEzwAK1JPrVHA2jtw0jgNI1oSRY= X-Received: by 2002:a25:ad5c:0:b0:dc2:3113:8700 with SMTP id l28-20020a25ad5c000000b00dc231138700mr4276876ybe.24.1711373726161; Mon, 25 Mar 2024 06:35:26 -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> In-Reply-To: From: "H.J. Lu" Date: Mon, 25 Mar 2024 06:34:49 -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 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 go= al is > >>>> simply to verify that linking a call succeeds. > >>> > >>> Right. And I would prefer if we could mark compat/otherwise non-stat= ic > >>> 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 failur= es > >> 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 sta= tic implementation is correct. We may not have more functional coverage for static libm in the first static libm test patch. But the first new sta= tic libm tests should least expose one static libm failure on x86-64. > >> My plan was to eventually track down what might be happening here, and > >> the currently autogenerated tests gave me a nice scaffolding to add co= verage > >> 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 duplicate= s > 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 t= he > --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. --=20 H.J.