Stéphane Graber has proposed merging lp:~stgraber/upstart/upstart-fix-env-test 
into lp:upstart.

Requested reviews:
  Upstart Reviewers (upstart-reviewers)

For more details, see:
https://code.launchpad.net/~stgraber/upstart/upstart-fix-env-test/+merge/150447

An earlier commit changed --inherit-env into --no-inherit-env, thereby changing
the default behaviour to inheriting the environment by default.

What the change didn't do however was restrict it to user sessions only, which
had the side effect of breaking the tests.

This branch does two things:
 1) set no_inherit_env = TRUE when not running under user sessions.
 2) pass --no-inherit-env to user session tests.
-- 
https://code.launchpad.net/~stgraber/upstart/upstart-fix-env-test/+merge/150447
Your team Upstart Reviewers is requested to review the proposed merge of 
lp:~stgraber/upstart/upstart-fix-env-test into lp:upstart.
=== modified file 'init/main.c'
--- init/main.c	2013-02-25 09:42:11 +0000
+++ init/main.c	2013-02-25 22:08:21 +0000
@@ -210,6 +210,9 @@
 
 	control_handle_bus_type ();
 
+	if (! user_mode)
+		no_inherit_env = TRUE;
+
 #ifndef DEBUG
 	if (use_session_bus == FALSE && user_mode == FALSE) {
 

=== modified file 'util/tests/test_initctl.c'
--- util/tests/test_initctl.c	2013-02-25 09:38:55 +0000
+++ util/tests/test_initctl.c	2013-02-25 22:08:21 +0000
@@ -824,6 +824,9 @@
 	NIH_MUST (nih_str_array_add (&args, NULL, NULL,
 				"--no-sessions"));
 
+	NIH_MUST (nih_str_array_add (&args, NULL, NULL,
+				"--no-inherit-env"));
+
 	if (confdir) {
 		NIH_MUST (nih_str_array_add (&args, NULL, NULL,
 					"--confdir"));

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

Reply via email to