Merge lp:~jamesodhunt/upstart/bug-1288243 into lp:upstart

Proposed by James Hunt on 2014-03-06
Status: Merged
Merged at revision: 1604
Proposed branch: lp:~jamesodhunt/upstart/bug-1288243
Merge into: lp:upstart
Diff against target: 98 lines (+16/-12)
4 files modified
ChangeLog (+10/-0)
lib/tests/test_libupstart.c (+1/-1)
test/test_util_common.c (+0/-6)
util/tests/test_initctl.c (+5/-5)
To merge this branch: bzr merge lp:~jamesodhunt/upstart/bug-1288243
Reviewer Review Type Date Requested Status
Upstart Reviewers 2014-03-06 Pending
Review via email: mp+209693@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2014-03-06 13:17:25 +0000
3+++ ChangeLog 2014-03-06 13:58:27 +0000
4@@ -1,5 +1,15 @@
5 2014-03-06 James Hunt <james.hunt@ubuntu.com>
6
7+ * lib/tests/test_libupstart.c: Revert to looking for 'init'
8+ rather than 'test_init'.
9+ * test/test_util_common.c: _start_upstart(): Don't modify argv[0] to
10+ make the tests inits appear as "test_init" since it breaks the re-exec
11+ tests (LP: #1288243).
12+ * util/tests/test_initctl.c: Revert to looking for "init' rather than
13+ 'test_init'.
14+
15+2014-03-06 James Hunt <james.hunt@ubuntu.com>
16+
17 * lib/tests/test_libupstart.c: test_libupstart(): Another
18 init => test_init fix.
19
20
21=== modified file 'lib/tests/test_libupstart.c'
22--- lib/tests/test_libupstart.c 2014-03-06 13:17:25 +0000
23+++ lib/tests/test_libupstart.c 2014-03-06 13:58:27 +0000
24@@ -133,7 +133,7 @@
25 TEST_EQ (ret, 0);
26
27 nih_message ("Running instance version: '%s'", version);
28- assert0 (fnmatch ("test_init (upstart*)", version, 0x0));
29+ assert0 (fnmatch ("init (upstart*)", version, 0x0));
30
31 STOP_UPSTART (upstart_pid);
32 TEST_DBUS_END (dbus_pid);
33
34=== modified file 'test/test_util_common.c'
35--- test/test_util_common.c 2013-11-14 15:19:31 +0000
36+++ test/test_util_common.c 2014-03-06 13:58:27 +0000
37@@ -505,12 +505,6 @@
38 }
39
40 argv0 = argv[0];
41-
42- /* Make the process stand out from existing non-test
43- * Session Init processes.
44- */
45- argv[0] = "test_init";
46-
47 assert (execvp (argv0, argv) != -1);
48 }
49
50
51=== modified file 'util/tests/test_initctl.c'
52--- util/tests/test_initctl.c 2014-03-05 13:51:52 +0000
53+++ util/tests/test_initctl.c 2014-03-06 13:58:27 +0000
54@@ -16960,7 +16960,7 @@
55 TEST_NE_P (cmd, NULL);
56 RUN_COMMAND (NULL, cmd, &output, &lines);
57 TEST_EQ (lines, 1);
58- TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
59+ TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
60 nih_free (output);
61
62 STOP_UPSTART (upstart_pid);
63@@ -16992,7 +16992,7 @@
64 TEST_NE_P (cmd, NULL);
65 RUN_COMMAND (NULL, cmd, &output, &lines);
66 TEST_EQ (lines, 1);
67- TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
68+ TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
69 nih_free (output);
70
71 /* Unset to stop initctl finding upstart via this route */
72@@ -17049,7 +17049,7 @@
73 TEST_NE_P (cmd, NULL);
74 RUN_COMMAND (NULL, cmd, &output, &lines);
75 TEST_EQ (lines, 1);
76- TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
77+ TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
78 nih_free (output);
79
80 STOP_UPSTART (upstart_pid);
81@@ -17098,7 +17098,7 @@
82 TEST_NE_P (cmd, NULL);
83 RUN_COMMAND (NULL, cmd, &output, &lines);
84 TEST_EQ (lines, 1);
85- TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
86+ TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
87 nih_free (output);
88
89 /* Pass the second D-Bus session bus address to the Session Init */
90@@ -17113,7 +17113,7 @@
91 TEST_NE_P (cmd, NULL);
92 RUN_COMMAND (NULL, cmd, &output, &lines);
93 TEST_EQ (lines, 1);
94- TEST_STR_MATCH (output[0], "test_init (upstart [0-9.][0-9.]*");
95+ TEST_STR_MATCH (output[0], "init (upstart [0-9.][0-9.]*");
96 nih_free (output);
97
98 /* Stop the 1st daemon */

Subscribers

People subscribed via source and target branches