Skip to content

Commit

Permalink
posix: Fix tst-execvpe5 for --enable-hardcoded-path-in-tests
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Adhemerval Zanella committed Mar 8, 2016
1 parent cc40840 commit e49b221
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
5 changes: 5 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2016-03-07 Adhemerval Zanella <adhemerval.zanella@linaro.org>

* posix/tst-execvpe5.c (do_test): Fix fix test invocation when
configured with --enable-hardcoded-path-in-tests.

2016-03-08 Joseph Myers <joseph@codesourcery.com>

[BZ #19677]
Expand Down
7 changes: 5 additions & 2 deletions posix/tst-execvpe5.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit e49b221

Please sign in to comment.