From patchwork Sun Mar 26 19:25:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Geissler X-Patchwork-Id: 66912 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D03153858C83 for ; Sun, 26 Mar 2023 19:26:29 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D03153858C83 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1679858789; bh=lO9GY3t5tykmu43UrBsbe7MWhFHBmz9N4Zy6sx3TxgU=; h=To:Cc:Subject:Date:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:List-Subscribe:From:Reply-To:From; b=mChRtDKYnFwPP3oeN9UeEdbXRSZ3OFIWL39scUwYwihWBz86dCVB9++S06YjCeokt D7mJO7ARmFLJ3CbRa/tMC+6+c28wwH6s7Gfbsh9w3evcWgWV0V+3NFnsAmMVY6lpyI nLtlrONeO3QlJDd5UHHINLjNjnA/VV/Y6sto53dE= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id CB8863858D37 for ; Sun, 26 Mar 2023 19:26:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org CB8863858D37 Received: by mail-wm1-x32c.google.com with SMTP id d11-20020a05600c3acb00b003ef6e6754c5so595036wms.5 for ; Sun, 26 Mar 2023 12:26:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679858766; x=1682450766; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lO9GY3t5tykmu43UrBsbe7MWhFHBmz9N4Zy6sx3TxgU=; b=hbTZ7FDfWErZV40nMtmbdaElo/6re332XrO3qJZtwJVjhDeARyclBFxtC6HFG92t1t iBmnjbSoTMTyPl4Ax55/dw7Og3wsMo2qKAxG8rqInB97PRd5jyhg/YSPjLTT/6QbzTxV Cs+4CC0GgvF0CZWbYeeEBJJk5i5jd+ynILtqRRsgrG6lCpqOFyJwHeor3MhbBrovk/72 Ieb0pTP55RJi0F5II4X2bwEs3seDUgB30L1L8LWsn9s80NKOkI6qIrtP+xy+NPL5y4tx soA2xJxzx0QfbXMyaFSNPhlaPGheUHb3m8U08desbZftszQs6aZxSkN+Q5QWkG5vkoFa GRBQ== X-Gm-Message-State: AO0yUKXdmsz1t9S3UrYRemkj7nOoVzQ7C/BUco4ADf9qrFnM40Bkbe/v M7nCoQInvFqsrUbtfJd0oowjgGLsTxgiJg== X-Google-Smtp-Source: AK7set8YryLrSc5GFDdETDxwa9U4vQ8cKaBmiXs0IdST7sDNapB7IoInQYb3cD3LENpLh0fdXmDsHQ== X-Received: by 2002:a05:600c:1550:b0:3ed:d2ae:9adb with SMTP id f16-20020a05600c155000b003edd2ae9adbmr8804982wmg.0.1679858766105; Sun, 26 Mar 2023 12:26:06 -0700 (PDT) Received: from localhost ([82.66.26.140]) by smtp.gmail.com with ESMTPSA id o9-20020a05600c510900b003ed793d9de0sm18599106wms.1.2023.03.26.12.26.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Mar 2023 12:26:05 -0700 (PDT) X-Google-Original-From: Romain Geissler To: libc-alpha@sourceware.org Cc: adhemerval.zanella@linaro.org, romain.geissler@amadeus.com Subject: [PATCH v2] Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh. Date: Sun, 26 Mar 2023 19:25:58 +0000 Message-Id: <20230326192558.64-1-romain.geissler@amadeus.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, 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 X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Romain Geissler via Libc-alpha From: Romain Geissler Reply-To: Romain Geissler Errors-To: libc-alpha-bounces+patchwork=sourceware.org@sourceware.org Sender: "Libc-alpha" Hi, This is a follow up of https://sourceware.org/pipermail/libc-alpha/2023-March/146331.html this sent by git send-mail, so hopefully the patch applies fine. Cheers, Romain Take into account ${sysconfdir} in elf/tst-ldconfig-p.sh. Reviewed-by: Adhemerval Zanella --- elf/Makefile | 2 +- elf/tst-ldconfig-p.sh | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) 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"