From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x32e.google.com (mail-ot1-x32e.google.com [IPv6:2607:f8b0:4864:20::32e]) by sourceware.org (Postfix) with ESMTPS id 48AF83858C1F for ; Wed, 22 Mar 2023 11:52:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 48AF83858C1F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-ot1-x32e.google.com with SMTP id x22-20020a056830409600b0069b30fb38f7so10187907ott.5 for ; Wed, 22 Mar 2023 04:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1679485919; h=content-transfer-encoding:in-reply-to:organization:from:references :to:content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=5Tz26jjIZI9uX7ikhQdfLPrCNvFMPf1qT0naO2khqvM=; b=a4MEdSTkhV+xCEXY33xTxmDiNLZkc8AgOklfxG0POL4AZjw9wCBfzY9XE2Qc2xKFSB AZ6v+S2dP3afTMYF0poeh3L6t1iVV9wMhDVJfosje2CIRdsBi0RYa9iqDMxkeMXt8enP KmMJsaCVPEgn84UGLwoNUS8g/5wWmDFAOBVzz/lOG9nsLZ53wrEY79gTGCdac1KK7sSR BWP4A9jBNHwuopLGzMcB8KCiVNSreCwmpnF8YsIhjCOpdXVG3I4f53m31hxD5/dgPNEn MTiegDQZIhDMvjuoE+grR2p2XduwuVH3FmG3zTcmWlT31kxL3l1hIGthaCx/fQJqv9v6 PkAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679485919; h=content-transfer-encoding:in-reply-to:organization:from:references :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=5Tz26jjIZI9uX7ikhQdfLPrCNvFMPf1qT0naO2khqvM=; b=A7ldEVFj6lQa61s3GnplLELbuqeXtXPTAtFJyUe+Z2vtHLcS+7138cgSLew6LtzbRE qjf/cmPWOawdPAwumZLAFB6nPt7LhbM8Ddtl4vekw3EgMGedHM0/TCuIxWbLTknZzb0R xmbPNcneply/nfKUmihnBdfWabIpZ+vsi/GTphsY+e9gARixAzBOMmo9iuVztBiYx+OY AAvqD4R8os6CoIO9YAipS/+GIDM72m5FEe3TQuKXghUj24DIOB78Uy232b9npekgaiBM 2g9aZdLa2iXSvceyE0mk2k9T/JJfMU+ESbpcmRj5hzEANRqKtBH4b5gOiSRLW4S8Wjdq +i3Q== X-Gm-Message-State: AO0yUKWXnE8MKHbvQqFOxD3PWJ5Sqyt5ONWrlysgvc1FHGX6ALujupFv SuRqAzahLC721SVpAm1pZuUeXwazvExWZaET4tGSUQ== X-Google-Smtp-Source: AK7set/EW8X07VYLw8xl94bvAUmV4yTC2B5VQVEymxDZ8rrVCWekejTUXaerFHlg9cEly2zjBqnLSA== X-Received: by 2002:a9d:4b0e:0:b0:68b:d266:e6d0 with SMTP id q14-20020a9d4b0e000000b0068bd266e6d0mr1171153otf.14.1679485918821; Wed, 22 Mar 2023 04:51:58 -0700 (PDT) Received: from ?IPV6:2804:1b3:a7c0:c260:d4b6:6c90:6159:ac3d? ([2804:1b3:a7c0:c260:d4b6:6c90:6159:ac3d]) by smtp.gmail.com with ESMTPSA id z22-20020a05683020d600b00698fd47ed99sm6164815otq.15.2023.03.22.04.51.56 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 22 Mar 2023 04:51:57 -0700 (PDT) Message-ID: Date: Wed, 22 Mar 2023 08:51:55 -0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH] Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh Content-Language: en-US To: libc-alpha@sourceware.org References: <586cec0c-4497-1029-da8f-e55d1967bba7@gmail.com> From: Adhemerval Zanella Netto Organization: Linaro In-Reply-To: <586cec0c-4497-1029-da8f-e55d1967bba7@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.3 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 13/03/23 18:46, Romain Geissler via Libc-alpha wrote: > Hi, > > While upgrading to the latest commit of the release branch 2.37, with an exotic glibc installation (I override explicitly the --prefix destination, the test tst-ldconfig-p.sh failed. Here is a small patch to take into account ${sysconfdir} so we don't hardcode it to /etc. > > PS: I hope the patch will be well formed, I have just setup Thunderbird to write this mail using gmail.com's smtp, unfortunately my employer forbids using anything else than Outlook to send mails, and almost no open source tools support the Exchange protocol... Unfortunately this did not work, patchwork was not able to apply neither I manually (thunderbird without extra configuration do not keep tabs if I recall correctly). The patch is not wrong, but building with a --prefix other than '/usr' triggers other issues: FAIL: elf/check-abi-libc FAIL: elf/tst-glibc-hwcaps-prepend-cache FAIL: elf/tst-ldconfig-ld_so_conf-update FAIL: elf/tst-unwind-main Which makes me wonder if we even support check without the canonical prefix. The elf/check-abi-libc would need to either be unsupported or add another hackery to ignore the patch (which is the test essentially). > > Cheers, > Romain > > > commit ad491ee678026eea33e4654da4ce86d4835bd240 > Author: Romain Geissler > Date:   Mon Mar 13 20:04:48 2023 +0000 > >     Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh. > > diff --git a/elf/Makefile b/elf/Makefile > index 4d0e04b2a20..262fbd1770c 100644 > --- a/elf/Makefile > +++ b/elf/Makefile > @@ -2421,7 +2421,7 @@ $(objpfx)tst-ldconfig-X.out : tst-ldconfig-X.sh $(objpfx)ldconfig >      $(evaluate-test) >   >  $(objpfx)tst-ldconfig-p.out : tst-ldconfig-p.sh $(objpfx)ldconfig > -    $(SHELL) $< '$(common-objpfx)' '$(test-wrapper-env)' \ > +    $(SHELL) $< '$(common-objpfx)' '$(sysconfdir)' '$(test-wrapper-env)' \ >           '$(run-program-env)' > $@; \ >      $(evaluate-test) >   > diff --git a/elf/tst-ldconfig-p.sh b/elf/tst-ldconfig-p.sh > index ec937bf4ec0..e966c4d1241 100644 > --- a/elf/tst-ldconfig-p.sh > +++ b/elf/tst-ldconfig-p.sh > @@ -23,11 +23,12 @@ >  # involves emulation when running ldconfig). >   >  common_objpfx=$1 > -test_wrapper_env=$2 > -run_program_env=$3 > +sysconfdir=$2 > +test_wrapper_env=$3 > +run_program_env=$4 >   > -if ! test -r /etc/ld.so.cache; then > -    echo "warning: /etc/ld.so.cache does not exist, test skipped" > +if ! test -r "${sysconfdir}/ld.so.cache"; then > +    echo "warning: ${sysconfdir}/ld.so.cache does not exist, test skipped" >      exit 77 >  fi >   > @@ -46,7 +47,7 @@ errors=0 >  case $status in >      (0) >      if head -n 1 "$testout" | \ > -        grep -q "libs found in cache \`/etc/ld.so.cache'\$" ; then > +        grep -q "libs found in cache \`${sysconfdir}/ld.so.cache'\$" ; then >          echo "info: initial string found" >>"$testout" >      else >          echo "error: initial string not found" >>"$testout" >