From patchwork Tue Mar 8 02:33:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 593793 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org 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 F15AF1409C4 for ; Tue, 8 Mar 2016 13:34:22 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b=rOTYY/Po; dkim-atps=neutral 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:subject:date:message-id; q=dns; s= default; b=xZuVjoZYmohWGa8ikBFj8nGIbVqH3GjQlTkfpZRE7y39oj0AZ9yCT XRNUtQYIT3GGcDX7+9TCRUj7LFvGKNqq90sVm7ItWCy2YOyBPMnvEGMIRpU6DySE NlwWPZmQqEd2pUSl6W9DXD9i2SjlRtTJlD61XKavZ9QMRk2Y5SeOjI= 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:subject:date:message-id; s=default; bh=RR+kEJDdqrlqnkjC4gJhhrRpo1A=; b=rOTYY/PoAXIiKYp+l2IajpXJ/P1W zW5HLNI9TRj5GMXFDdL+aarrtd0KTqK25hZA0nJpNf3LI3mfegOdFn9bJp2jkVRq gdwriodd6SDlfE90DJx2OX3/Ik3iQaTHZM0faK6RlQ2mE6KbkrRFBHAm33AoAcgy I/17RD0TlvyBAS8= Received: (qmail 97301 invoked by alias); 8 Mar 2016 02:34:14 -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 97277 invoked by uid 89); 8 Mar 2016 02:34:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-pf0-f180.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=vBbKhFoQVpPwdiWt3tydRk0aPtlaIZylnEqp5ZHpNMI=; b=On+JDho2iZOhAqx9SwzZrgSnMz4SyI93hIDrAICBbf6D11REZON3och8zkZV1WlgfC nQ5pNWhgqp3dbpcnEtXm7dDwPX9JfujnVGowGD2NsdGfD6CNjy4mYYT4fzqF9CXFfEYc LjRpCMgrlyL65fr9My1rQQ/YLmkRNhPAWwYdjsZgV9ncrIuziKRHGwq0kk1WpXLPmSeE ci/SYbxucU7ecC1KY2knlhORnN4b8l20m8N+Z68qlexsx/XsT8QACf452VsPsrIqpD+B 6CbB4Z2AXj0DMP/YODo8NZO+lPkX9bwaacTkTX8ZDLMyMJ/CjvGlT8Z+oTSR/16C4/nQ Bfgw== X-Gm-Message-State: AD7BkJJvobHoPnocCIS1tpkvuoqQP1qtcRJCVhqDw3UgsPERHZ0nHyuKGsa9aomvwSWplwMY X-Received: by 10.98.68.209 with SMTP id m78mr20527356pfi.153.1457404441940; Mon, 07 Mar 2016 18:34:01 -0800 (PST) From: Adhemerval Zanella X-Google-Original-From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [COMMITTED] [PATCH] posix: Fix tst-execvpe5 for --enable-hardcoded-path-in-tests Date: Tue, 8 Mar 2016 09:33:48 +0700 Message-Id: <1457404428-3938-1-git-send-email-adhemerval.zanella@linaro.com> This patch fixes the posix/tst-execvpe5 invocation when GLIBC is configured with --enable-hardcoded-path-in-tests which fails with: $ cat posix/tst-execvpe5.out Wrong number of arguments (4) Checked on x86-64 and powerpc64le. * posix/tst-execvpe5.c (do_test): Fix fix test invocation when configured with --enable-hardcoded-path-in-tests. --- posix/tst-execvpe5.c | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/posix/tst-execvpe5.c b/posix/tst-execvpe5.c index ffd764a..3473330 100644 --- a/posix/tst-execvpe5.c +++ b/posix/tst-execvpe5.c @@ -88,13 +88,16 @@ do_test (int argc, char *argv[]) + "--library-path" optional + the library path optional + the application name + + if --enable-hardcoded-path-in-tests is used, just + + the application name */ if (restart) { if (argc != 1) { - printf ("Wrong number of arguments (%d)\n", argc); + printf ("Wrong number of arguments (%d) in restart\n", argc); exit (EXIT_FAILURE); } @@ -125,7 +128,7 @@ do_test (int argc, char *argv[]) } else { - char *args[] = { argv[1], argv[1], + char *args[] = { argv[0], (char *) "--direct", (char *) "--restart", NULL }; execvpe (args[0], args, envs); }