Merge authors:
  James Hunt (jamesodhunt)
Related merge proposals:
  https://code.launchpad.net/~jamesodhunt/upstart/bug-1288243/+merge/209693
  proposed by: James Hunt (jamesodhunt)
------------------------------------------------------------
revno: 1604 [merge]
committer: Dimitri John Ledkov <[email protected]>
branch nick: trunk
timestamp: Thu 2014-03-06 14:16:26 +0000
message:
  merge lp:~jamesodhunt/upstart/bug-1288243
modified:
  ChangeLog
  lib/tests/test_libupstart.c
  test/test_util_common.c
  util/tests/test_initctl.c


--
lp:upstart
https://code.launchpad.net/~upstart-devel/upstart/trunk

Your team Upstart Reviewers is subscribed to branch lp:upstart.
To unsubscribe from this branch go to 
https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'ChangeLog'
--- ChangeLog	2014-03-06 13:17:25 +0000
+++ ChangeLog	2014-03-06 13:57:47 +0000
@@ -1,5 +1,15 @@
 2014-03-06  James Hunt  <[email protected]>
 
+	* lib/tests/test_libupstart.c: Revert to looking for 'init'
+	  rather than 'test_init'.
+	* test/test_util_common.c: _start_upstart(): Don't modify argv[0] to
+	  make the tests inits appear as "test_init" since it breaks the re-exec
+	  tests (LP: #1288243).
+	* util/tests/test_initctl.c: Revert to looking for "init' rather than
+	  'test_init'.
+
+2014-03-06  James Hunt  <[email protected]>
+
 	* lib/tests/test_libupstart.c: test_libupstart(): Another
 	  init => test_init fix.
 

=== modified file 'lib/tests/test_libupstart.c'
--- lib/tests/test_libupstart.c	2014-03-06 13:17:25 +0000
+++ lib/tests/test_libupstart.c	2014-03-06 13:57:47 +0000
@@ -133,7 +133,7 @@
 	TEST_EQ (ret, 0);
 
 	nih_message ("Running instance version: '%s'", version);
-	assert0 (fnmatch ("test_init (upstart*)", version, 0x0));
+	assert0 (fnmatch ("init (upstart*)", version, 0x0));
 
 	STOP_UPSTART (upstart_pid);
 	TEST_DBUS_END (dbus_pid);

=== modified file 'test/test_util_common.c'
--- test/test_util_common.c	2013-11-14 15:19:31 +0000
+++ test/test_util_common.c	2014-03-06 13:57:47 +0000
@@ -505,12 +505,6 @@
 		}
 
 		argv0 = argv[0];
-
-		/* Make the process stand out from existing non-test
-		 * Session Init processes.
-		 */
-		argv[0] = "test_init";
-
 		assert (execvp (argv0, argv) != -1);
 	}
 

=== modified file 'util/tests/test_initctl.c'
--- util/tests/test_initctl.c	2014-03-05 13:51:52 +0000
+++ util/tests/test_initctl.c	2014-03-06 13:57:47 +0000
@@ -16960,7 +16960,7 @@
 	TEST_NE_P (cmd, NULL);
 	RUN_COMMAND (NULL, cmd, &output, &lines);
 	TEST_EQ (lines, 1);
-	TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
+	TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
 	nih_free (output);
 
 	STOP_UPSTART (upstart_pid);
@@ -16992,7 +16992,7 @@
 	TEST_NE_P (cmd, NULL);
 	RUN_COMMAND (NULL, cmd, &output, &lines);
 	TEST_EQ (lines, 1);
-	TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
+	TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
 	nih_free (output);
 
 	/* Unset to stop initctl finding upstart via this route */
@@ -17049,7 +17049,7 @@
 	TEST_NE_P (cmd, NULL);
 	RUN_COMMAND (NULL, cmd, &output, &lines);
 	TEST_EQ (lines, 1);
-	TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
+	TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
 	nih_free (output);
 
 	STOP_UPSTART (upstart_pid);
@@ -17098,7 +17098,7 @@
 	TEST_NE_P (cmd, NULL);
 	RUN_COMMAND (NULL, cmd, &output, &lines);
 	TEST_EQ (lines, 1);
-	TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
+	TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
 	nih_free (output);
 
 	/* Pass the second D-Bus session bus address to the Session Init */
@@ -17113,7 +17113,7 @@
 	TEST_NE_P (cmd, NULL);
 	RUN_COMMAND (NULL, cmd, &output, &lines);
 	TEST_EQ (lines, 1);
-	TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
+	TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
 	nih_free (output);
 
 	/* Stop the 1st daemon */

-- 
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to