This is the mail archive of the glibc-cvs@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]

GNU C Library master sources branch master updated. glibc-2.17-94-gc34521c


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  c34521ceac1ba7aee2afa06a883415605ba9e07c (commit)
       via  4cf8f2098f227d32f3b73c70a6498c84872c24ba (commit)
      from  828beb132ddf5664cf9971329e8cdcb93dce43af (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c34521ceac1ba7aee2afa06a883415605ba9e07c

commit c34521ceac1ba7aee2afa06a883415605ba9e07c
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 10 14:15:49 2013 -0800

    Support run bug-setlocale1 directly

diff --git a/ChangeLog b/ChangeLog
index 147c82b..7935185a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,14 @@
 2013-01-10  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* Makefile (tests-static): New variable.
+	(tests): Add $(tests-static).
+	(bug-setlocale1-ARGS): Set to -- $(built-program-cmd).
+	(bug-setlocale1-static-ENV): New variable.
+	(bug-setlocale1-static-ARGS): Likewise.
+	* bug-setlocale1.c (do_test): Support run directly.  Check env[1]
+	instead of newargv[0].
+	* bug-setlocale1-static.c: New file.
+
 	* posix/Makefile (tests-static): New variable.
 	(tests): Add $(tests-static).
 	(tst-exec-static-ARGS): New variable.
diff --git a/localedata/Makefile b/localedata/Makefile
index d9f66c5..9239164 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -78,6 +78,8 @@ locale_test_suite := tst_iswalnum tst_iswalpha tst_iswcntrl            \
 tests = $(locale_test_suite) tst-digits tst-setlocale bug-iconv-trans \
 	tst-leaks tst-mbswcs6 tst-xlocale1 tst-xlocale2 bug-usesetlocale \
 	tst-strfmon1 tst-sscanf bug-setlocale1 tst-setlocale2
+tests-static = bug-setlocale1-static
+tests += $(tests-static)
 ifeq (yes,$(build-shared))
 ifneq (no,$(PERL))
 tests: $(objpfx)mtrace-tst-leaks
@@ -285,7 +287,9 @@ $(objpfx)mtrace-tst-leaks: $(objpfx)tst-leaks.out
 	$(common-objpfx)malloc/mtrace $(objpfx)tst-leaks.mtrace > $@
 
 bug-setlocale1-ENV = LOCPATH=$(common-objpfx)localedata
-bug-setlocale1-ARGS = $(common-objpfx)
+bug-setlocale1-ARGS = -- $(built-program-cmd)
+bug-setlocale1-static-ENV = $(bug-setlocale1-ENV)
+bug-setlocale1-static-ARGS = $(bug-setlocale1-ARGS)
 tst-setlocale2-ENV = LOCPATH=$(common-objpfx)localedata
 
 $(objdir)/iconvdata/gconv-modules:
diff --git a/localedata/bug-setlocale1-static.c b/localedata/bug-setlocale1-static.c
new file mode 100644
index 0000000..f37177b
--- /dev/null
+++ b/localedata/bug-setlocale1-static.c
@@ -0,0 +1 @@
+#include "bug-setlocale1.c"
diff --git a/localedata/bug-setlocale1.c b/localedata/bug-setlocale1.c
index cf787be..dc7f6f3 100644
--- a/localedata/bug-setlocale1.c
+++ b/localedata/bug-setlocale1.c
@@ -12,16 +12,16 @@ do_test (int argc, char *argv[])
   if (argc > 1)
     {
       char *newargv[5];
-      asprintf (&newargv[0], "%self/ld.so", argv[1]);
-      if (newargv[0] == NULL)
+      int i;
+      if (argc != 2 && argc != 5)
 	{
-	  puts ("asprintf failed");
+	  printf ("wrong number of arguments (%d)\n", argc);
 	  return 1;
 	}
-      newargv[1] = (char *) "--library-path";
-      newargv[2] = argv[1];
-      newargv[3] = argv[0];
-      newargv[4] = NULL;
+
+      for (i = 0; i < (argc == 5 ? 4 : 1); i++)
+	newargv[i] = argv[i + 1];
+      newargv[i] = NULL;
 
       char *env[3];
       env[0] = (char *) "LC_CTYPE=de_DE.UTF-8";
@@ -32,9 +32,9 @@ do_test (int argc, char *argv[])
 	  return 1;
 	}
       asprintf (&env[1], "LOCPATH=%s", loc);
-      if (newargv[0] == NULL)
+      if (env[1] == NULL)
 	{
-	  puts ("second asprintf failed");
+	  puts ("asprintf failed");
 	  return 1;
 	}
       env[2] = NULL;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4cf8f2098f227d32f3b73c70a6498c84872c24ba

commit 4cf8f2098f227d32f3b73c70a6498c84872c24ba
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Thu Jan 10 14:14:55 2013 -0800

    Support run tst-exec and tst-spawn directly

diff --git a/ChangeLog b/ChangeLog
index 08474f4..147c82b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2013-01-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+	* posix/Makefile (tests-static): New variable.
+	(tests): Add $(tests-static).
+	(tst-exec-static-ARGS): New variable.
+	(tst-spawn-static-ARGS): Likewise.
+	* posix/tst-exec-static.c: New file.
+	* posix/tst-spawn-static.c: Likewise.
+	* posix/tst-exec.c: Support run directly.
+	* posix/tst-spawn.c: Likewise.
+
 2013-01-10  Joseph Myers  <joseph@codesourcery.com>
 
 	* elf/link.h (struct dl_phdr_info): Use __extension__ with long
diff --git a/posix/Makefile b/posix/Makefile
index ce98c59..fda6e13 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -92,6 +92,8 @@ ifeq (yes,$(build-shared))
 test-srcs	:= globtest
 tests           += wordexp-test tst-exec tst-spawn
 endif
+tests-static	= tst-exec-static tst-spawn-static
+tests		+= $(tests-static)
 others		:= getconf
 install-bin	:= getconf
 install-others-programs	:= $(inst_libexecdir)/getconf
@@ -172,7 +174,9 @@ tstgetopt-ARGS = -a -b -cfoobar --required foobar --optional=bazbug \
 		--none random --col --color --colour
 
 tst-exec-ARGS = -- $(host-built-program-cmd)
+tst-exec-static-ARGS = $(tst-exec-ARGS)
 tst-spawn-ARGS = -- $(host-built-program-cmd)
+tst-spawn-static-ARGS = $(tst-spawn-ARGS)
 tst-dir-ARGS = `pwd` `cd $(common-objdir)/$(subdir); pwd` `cd $(common-objdir); pwd` $(objpfx)tst-dir
 tst-chmod-ARGS = $(objdir)
 tst-vfork3-ARGS = --test-dir=$(objpfx)
diff --git a/posix/tst-exec-static.c b/posix/tst-exec-static.c
new file mode 100644
index 0000000..bdd6369
--- /dev/null
+++ b/posix/tst-exec-static.c
@@ -0,0 +1 @@
+#include "tst-exec.c"
diff --git a/posix/tst-exec.c b/posix/tst-exec.c
index 3a76b32..a1a2c18 100644
--- a/posix/tst-exec.c
+++ b/posix/tst-exec.c
@@ -126,10 +126,10 @@ do_test (int argc, char *argv[])
   int status;
 
   /* We must have
-     - four parameters left of called initially
-       + path for ld.so
-       + "--library-path"
-       + the library path
+     - one or four parameters left if called initially
+       + path for ld.so		optional
+       + "--library-path"	optional
+       + the library path	optional
        + the application name
      - three parameters left if called through re-execution
        + file descriptor number which is supposed to be closed
@@ -145,7 +145,7 @@ do_test (int argc, char *argv[])
       return handle_restart (argv[1], argv[2], argv[3]);
     }
 
-  if (argc != 5)
+  if (argc != 2 && argc != 5)
     error (EXIT_FAILURE, 0, "wrong number of arguments (%d)", argc);
 
   /* Prepare the test.  We are creating two files: one which file descriptor
@@ -185,8 +185,12 @@ do_test (int argc, char *argv[])
       snprintf (fd2name, sizeof fd2name, "%d", fd2);
 
       /* This is the child.  Construct the command line.  */
-      execl (argv[1], argv[1], argv[2], argv[3], argv[4], "--direct",
-	     "--restart", fd1name, fd2name, name1, NULL);
+      if (argc == 5)
+	execl (argv[1], argv[1], argv[2], argv[3], argv[4], "--direct",
+	       "--restart", fd1name, fd2name, name1, NULL);
+      else
+	execl (argv[1], argv[1], "--direct",
+	       "--restart", fd1name, fd2name, name1, NULL);
 
       error (EXIT_FAILURE, errno, "cannot exec");
     }
diff --git a/posix/tst-spawn-static.c b/posix/tst-spawn-static.c
new file mode 100644
index 0000000..1b1d34f
--- /dev/null
+++ b/posix/tst-spawn-static.c
@@ -0,0 +1 @@
+#include "tst-spawn.c"
diff --git a/posix/tst-spawn.c b/posix/tst-spawn.c
index 718602e..66fd26b 100644
--- a/posix/tst-spawn.c
+++ b/posix/tst-spawn.c
@@ -169,12 +169,13 @@ do_test (int argc, char *argv[])
   char fd3name[18];
   char fd4name[18];
   char *spargv[12];
+  int i;
 
   /* We must have
-     - four parameters left of called initially
-       + path for ld.so
-       + "--library-path"
-       + the library path
+     - one or four parameters left if called initially
+       + path for ld.so		optional
+       + "--library-path"	optional
+       + the library path	optional
        + the application name
      - five parameters left if called through re-execution
        + file descriptor number which is supposed to be closed
@@ -183,7 +184,7 @@ do_test (int argc, char *argv[])
        + thhe duped second descriptor
        + the name of the closed descriptor
   */
-  if (argc != (restart ? 6 : 5))
+  if (argc != (restart ? 6 : 2) && argc != (restart ? 6 : 5))
     error (EXIT_FAILURE, 0, "wrong number of arguments (%d)", argc);
 
   if (restart)
@@ -235,18 +236,16 @@ do_test (int argc, char *argv[])
    snprintf (fd3name, sizeof fd3name, "%d", fd3);
    snprintf (fd4name, sizeof fd4name, "%d", fd4);
 
-   spargv[0] = argv[1];
-   spargv[1] = argv[2];
-   spargv[2] = argv[3];
-   spargv[3] = argv[4];
-   spargv[4] = (char *) "--direct";
-   spargv[5] = (char *) "--restart";
-   spargv[6] = fd1name;
-   spargv[7] = fd2name;
-   spargv[8] = fd3name;
-   spargv[9] = fd4name;
-   spargv[10] = name1;
-   spargv[11] = NULL;
+   for (i = 0; i < (argc == (restart ? 6 : 5) ? 4 : 1); i++)
+     spargv[i] = argv[i + 1];
+   spargv[i++] = (char *) "--direct";
+   spargv[i++] = (char *) "--restart";
+   spargv[i++] = fd1name;
+   spargv[i++] = fd2name;
+   spargv[i++] = fd3name;
+   spargv[i++] = fd4name;
+   spargv[i++] = name1;
+   spargv[i] = NULL;
 
    if (posix_spawn (&pid, argv[1], &actions, NULL, spargv, environ) != 0)
      error (EXIT_FAILURE, errno, "posix_spawn");

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                          |   20 ++++++++++++++++++++
 localedata/Makefile                |    6 +++++-
 localedata/bug-setlocale1-static.c |    1 +
 localedata/bug-setlocale1.c        |   18 +++++++++---------
 posix/Makefile                     |    4 ++++
 posix/tst-exec-static.c            |    1 +
 posix/tst-exec.c                   |   18 +++++++++++-------
 posix/tst-spawn-static.c           |    1 +
 posix/tst-spawn.c                  |   33 ++++++++++++++++-----------------
 9 files changed, 68 insertions(+), 34 deletions(-)
 create mode 100644 localedata/bug-setlocale1-static.c
 create mode 100644 posix/tst-exec-static.c
 create mode 100644 posix/tst-spawn-static.c


hooks/post-receive
-- 
GNU C Library master sources


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