From patchwork Mon May 13 16:59:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 164041 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1580687ili; Mon, 13 May 2019 10:00:31 -0700 (PDT) X-Google-Smtp-Source: APXvYqyDlI4qbZK44liNkH7INONNYmowqaMqU3BZ8rnYxjAhjgs2H4WVa2u8yk++02NKglGum6oW X-Received: by 2002:a63:234c:: with SMTP id u12mr33652270pgm.264.1557766831339; Mon, 13 May 2019 10:00:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557766831; cv=none; d=google.com; s=arc-20160816; b=e0sFDtD+OLnNeaKGXxSm+tajOuHAHRis7i7c7JHIoiUNN2Y3D5MWjoc/oi7q7D6+bq v2HdujjjzvUhgV6iveC428ZbXmEho7j43vJ67JPHUNnbKJeTtirkkuqq54+379v6Es1f vbKXfz4/z+xz5zxD/w+olGqtLAtbIi+UDoNdtUorJUQYPHzJxwpFFShleKfWMXo3+zxR Yi0bSf2Cz3YPZTFRovAH/Tq5k3SaZBIg+Icr7Tv3Am/oBd13Hdz37kz8JzwkzWCRVwgv NXX9ihymdzwM/8gIiiXAcX78cK4AgiGhqkhKNxpq+6AqbUwZ+M1yhYRkF0q9sWiNAwKv 4rxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:delivered-to:sender:list-help:list-post:list-archive :list-subscribe:list-unsubscribe:list-id:precedence:mailing-list :dkim-signature:domainkey-signature; bh=+HFb/MCBBnzyFoYf24Sqja3VP692/AMRNKl2QuS76Q8=; b=OK3EEAPqhSgac93+AWI6G9Zw1hKg6ZQRa7pR4ou/I9Ar9b8vrn7g7LtvVNZtdg6BpY Y3T9dU4gcV2kxAJXfhsYRLh6z42MpEhZVU63ZyCGHU2YeDK1ncyzxh1Kb8vl53aZW9mW jfJKuuyK03tWIYXcAEKNipLNhfJUkOjgco8tu02ru6MQUxT/jDdAwvnD/dAUHL3kyVws eVb4ilYKWxiOdF33WqELSSnqLoeuzPX7+uqFAIbBFpYBJ5YgnuIESOCqYp9sku/ef26k jAUBx/IxtkNSRXiw/6+6FE78IBOoXRrKnLALpw7RzTJEjgyH0iPPy2lG6qvESgjS1Jd8 Yjqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=S8QmJt4n; dkim=pass header.i=@linaro.org header.s=google header.b=wbWy7IMX; spf=pass (google.com: domain of libc-alpha-return-101958-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-101958-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id 3si3223970pgj.104.2019.05.13.10.00.31 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 May 2019 10:00:31 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-101958-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=S8QmJt4n; dkim=pass header.i=@linaro.org header.s=google header.b=wbWy7IMX; spf=pass (google.com: domain of libc-alpha-return-101958-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom="libc-alpha-return-101958-patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=N+dAjI1ESKAqoln9zKzCSB8AAtLB7m5 QuD01G2O/QAgeVA1eVTjhju+9/994TxvtLTInAlDXeFiuPLcuqgg86tJDFp+fQTP ZKvtzlTiPeNMg7iLzkwI77AugsdlSqktNjXhk34qDJfIAI+nrPr29gDKOPxCXiLK +DCGjboih60w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=nNDKSmsSSDX7bVMQhxiuXfTV7Tk=; b=S8QmJ t4ntlFJ8R/cqL/3OQmbt7oIqZH+MkHLARXxqewI9PLEL99K7HsWuUDu8BdZSHOnE q6g4S2hGGwr0NNprzCEGF5xHfrhOhuC8Ozfe2t0GzSieP/yfIG3kEHH+CuJDlQHA 7In2q9VcFph+XsYdhv2tnYgqxedEKmkZpsOAVM= Received: (qmail 8350 invoked by alias); 13 May 2019 17:00:02 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 8270 invoked by uid 89); 13 May 2019 17:00:02 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=18, 6 X-HELO: mail-vs1-f67.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=+HFb/MCBBnzyFoYf24Sqja3VP692/AMRNKl2QuS76Q8=; b=wbWy7IMXgggLaAvQNISnXWKgtrsd7S6QyLQ5gS0Qe35O8UZfFqFMATTPZfLhRxKDx8 pvobqv61NRDZTMUFbp4M9+IRkdEzNuyA7rz0dds5DYxkJ/cw6fPQsq20h0xpinwUNKdv sJxww15IR7lFnl8jR9R7lTpeGiKlBzrh8XXUAz1FvPq7EpOereCpMie9J+8dAdqjNMHk N3oS87I8MwmXZz3tyJXdyhw5JJZhHpOz3UUWRn9ZNa2MFsk/YcpCZIXZkK6QjSYlpIxx qrZ6z4siggW7i1g9Bo0LcUQ0HsFqDHEgJPaGcpPVcQtfF0c6+libeqFOP0G8kdPnUTEZ PMbA== Return-Path: From: Adhemerval Zanella To: libc-alpha@sourceware.org Cc: Carlos O'Donell Subject: [PATCH 3/3] elf: Fix tst-pldd for non-default --prefix and/or --bindir (BZ#24544) Date: Mon, 13 May 2019 13:59:52 -0300 Message-Id: <20190513165952.28972-3-adhemerval.zanella@linaro.org> In-Reply-To: <20190513165952.28972-1-adhemerval.zanella@linaro.org> References: <20190513165952.28972-1-adhemerval.zanella@linaro.org> Use a new libsupport support_bindir_prefix instead of a hardcoded /usr/bin to create the pldd path on container directory. Checked on x86_64-linux-gnu with default and non-default --prefix and --bindir paths, as well with --enable-hardcoded-path-in-tests. [BZ #24544] * elf/tst-pldd.c (do_test): Use support_bindir_prefix instead of pre-defined value. --- elf/tst-pldd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/elf/tst-pldd.c b/elf/tst-pldd.c index 2a9f58936f..6b7c94a1c0 100644 --- a/elf/tst-pldd.c +++ b/elf/tst-pldd.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -28,6 +29,7 @@ #include #include #include +#include static void target_process (void *arg) @@ -60,12 +62,14 @@ do_test (void) char pid[3 * sizeof (uint32_t) + 1]; snprintf (pid, array_length (pid), "%d", target.pid); - const char prog[] = "/usr/bin/pldd"; + char *prog = xasprintf ("%s/pldd", support_bindir_prefix); pldd = support_capture_subprogram (prog, (char *const []) { (char *) prog, pid, NULL }); support_capture_subprocess_check (&pldd, "pldd", 0, sc_allow_stdout); + + free (prog); } /* Check 'pldd' output. The test is expected to be linked against only