This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v5 0/3] posix: Execute file function fixes
- From: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Tue, 8 Mar 2016 00:02:22 +0700
- Subject: Re: [PATCH v5 0/3] posix: Execute file function fixes
- Authentication-results: sourceware.org; auth=none
- References: <1456770820-21341-1-git-send-email-adhemerval dot zanella at linaro dot org> <56D73535 dot 9030708 at linaro dot org> <CAMe9rOpuyCeANL1uANic4O-=pRgC1OW6kLZqe+4+2Pt5_j7bpg at mail dot gmail dot com> <56DDA03F dot 8010600 at linaro dot org> <CAMe9rOpTj8-DcVrp+RdrSjPCL=mjBo9HUEr-6MjwJw0wJr41qg at mail dot gmail dot com> <56DDA80B dot 2000706 at linaro dot org>
On 07-03-2016 23:10, Adhemerval Zanella wrote:
>
>
> On 07-03-2016 22:50, H.J. Lu wrote:
>> On Mon, Mar 7, 2016 at 7:37 AM, Adhemerval Zanella
>> <adhemerval.zanella@linaro.org> wrote:
>>>
>>>
>>> On 07-03-2016 21:46, H.J. Lu wrote:
>>>> On Wed, Mar 2, 2016 at 10:47 AM, Adhemerval Zanella
>>>> <adhemerval.zanella@linaro.org> wrote:
>>>>> I believe with latest comments from Paul Eggert I see these patchset is ok
>>>>> for master. So I would like to commit it shortly if no one opposes it.
>>>>>
>>>>
>>>> On x86-64, I got
>>>>
>>>> FAIL: posix/tst-execvpe5
>>>>
>>>> # cat posix/tst-execvpe5.out
>>>> Wrong number of arguments (4)
>>>>
>>>
>>> Could you paste the result of strace -f with test running in your environment?
>>> I am trying to reproduce it, but without much success. Also the buildbot is
>>> not showing the issue.
>>
>> Please configure glibc with
>>
>> --enable-hardcoded-path-in-tests
>>
>
> Right, the testcase does not handle this scenario. I will fix it.
>
This fixes the issue on tst-execvpe5 with --enable-hardcoded-path-in-tests:
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);
}
I will commit this tomorrow (since I on UTC+7).