From patchwork Thu May 9 21:52:48 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Romain Geissler X-Patchwork-Id: 32622 Received: (qmail 54553 invoked by alias); 9 May 2019 21:56:16 -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 54541 invoked by uid 89); 9 May 2019 21:56:16 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-13.4 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 spammy=strcat, prog X-HELO: mail1.bemta26.messagelabs.com Return-Path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amadeus.com; s=SYM2018Q2; t=1557438972; i=@amadeus.com; bh=7bPGS7MjdYvV6Xzp2TbqzdRz8sFzi1oZMZdf2aGwY/w=; h=Date:From:To:CC:Subject:Message-ID:MIME-Version:Content-Type; b=dMyiinMTm60r/982P5MiZB39mTGXBPf0/wm3v1134jtwZK3B5mKXyYkdsQzXrPyuX QbnTyUNQzkmP9nqGRqrQFkEppgqUIOa9E2KxxnJr6zPjBInECQJ6qNLNqQVCjDkBQu BToAsKoZaXYPWK8teHznZ5lCsT0cW4TQgD+tGDAtgCQNiAONWvAzcZ4XTrUJClzrCK fnc9+g8q9IA+NwidQAZlRauu2ot5WWJJXVQvpW6M2YG7nR05dJmNBvqZVoUDzoMWod SYT7BQNXlHuOYMxXSxNRjP2+n4Atiuws14IMRNo8JiIiTZwoCHBgaYSO7H3daUbtge 5XChSUXZBwgMQ== X-Env-Sender: romain.geissler@amadeus.com X-Msg-Ref: server-4.tower-230.messagelabs.com!1557438966!4982085!1 X-SYMC-ESS-Client-Auth: outbound-route-from=pass X-StarScan-Received: X-StarScan-Version: 9.31.5; banners=-,-,- X-VirusChecked: Checked Date: Thu, 9 May 2019 21:52:48 +0000 From: Romain Geissler To: CC: Subject: [BZ 24544] Use support_install_prefix in elf/tst-pldd.c Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 Hi, This should fix BZ 24544 by using support_install_prefix as suggested by Carlos. Tested on my use case with --prefix, I have not tried without --prefix, is support_install_prefix equal to "/usr" by default, or is it "/", or is it empty ? Cheers, Romain 2019-05-09 Romain Geissler [BZ #24544] * elf/tst-pldd.c: Include . (PATH_MAX) [!PATH_MAX]: Define PATH_MAX macro. (do_test): Use support_install_prefix to compute pldd path. From 9a311911c3a74ef11626aaf1b1950d89d0ea20be Mon Sep 17 00:00:00 2001 From: Romain Geissler Date: Thu, 9 May 2019 21:38:42 +0000 Subject: [PATCH] [BZ #24544] Use support_install_prefix in elf/tst-pldd.c Reviewed-by: Carlos O'Donell --- elf/tst-pldd.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/elf/tst-pldd.c b/elf/tst-pldd.c index 2a9f58936f0..534e28ed502 100644 --- a/elf/tst-pldd.c +++ b/elf/tst-pldd.c @@ -25,10 +25,15 @@ #include #include +#include #include #include #include +#ifndef PATH_MAX +# define PATH_MAX 4096 +#endif + static void target_process (void *arg) { @@ -60,7 +65,9 @@ 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[PATH_MAX] = ""; + strcpy(prog, support_install_prefix); + strcat(prog, "/bin/pldd"); pldd = support_capture_subprogram (prog, (char *const []) { (char *) prog, pid, NULL });