This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH v5 0/3] posix: Execute file function fixes



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).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]