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: 1098993 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-101958-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="hsK0umqB"; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="wbWy7IMX"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 452nBN3kcHz9sBr for ; Tue, 14 May 2019 03:00:28 +1000 (AEST) 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=HDykK62SbarHR8ID9iRAgna1r8cNWnx 5sQlSVr7uTtOhiia8NapFeuakClIC3Hyr5dSziRxdhApA6BDvw+pb9TvKtFHh/B0 CPWRLj/zxBxCySRk/ali9yT8OHZ7xXzTJoHNk67H47eOPIeRXlwLl7bLStOmm8NG FoH/NubVCZHY= 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=hsK0u mqBNazOdBCV5t13Yn4HTKbQTpZTnUyO2X3QjIHtaoMVSD2jYjrJ1e0tyr020JFn1 wREA3ZfaNO00fDOZN5XfnBhZs9t4rdj58fQHDy9lNJbUtaYbnzTgYb3/ds/7LZ58 PVIzD4JmHVPfvXFOjrx2Up2xEhH5ivTvgdnH20= 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== 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(-) 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