From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-x32c.google.com with SMTP id d11-20020a05600c3acb00b003ef6e6754c5so595036wms.5 for ; Sun, 26 Mar 2023 12:26:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679858766; x=1682450766; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=lO9GY3t5tykmu43UrBsbe7MWhFHBmz9N4Zy6sx3TxgU=; b=QceMStY7psbz9fZoDByySYIM0DKLpUreJT8VJ2qcxLI1KGzjlKtf6SyhbvEx3kSZST 9P4B0/A9ZWSoinAaILoSkDQvibMy9x8Bc11ZJpQFEg/qGXJiHzGBVI9DxlZ97Rv6b6ll AuXAWRsHJIGYJAKEgDxOa3yknSmsu1XItjkE7Wm50tqF0qLHickdyb6wQu31Pxzb9+yV 7UFg+bjqf9WEwb1UHKFZxlaNZqlXDS7n7DZ5RMCj/3x0g3F5IfQuuIZdI5XtyMl51LmG QDX29aZf1F3naifQ7afAvZ6xwLCSr1KxObR/KGVJUGH6R+otidk91gRais15HOopo66U sIXw== 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) From: Romain Geissler 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 Content-Transfer-Encoding: 8bit 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 List-Id: 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. --- 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" -- 2.31.1