Merge lp:~jamesodhunt/upstart/test-upstart-name into lp:upstart

Proposed by James Hunt
Status: Merged
Merged at revision: 1598
Proposed branch: lp:~jamesodhunt/upstart/test-upstart-name
Merge into: lp:upstart
Diff against target: 49 lines (+19/-2)
2 files modified
ChangeLog (+7/-0)
test/test_util_common.c (+12/-2)
To merge this branch: bzr merge lp:~jamesodhunt/upstart/test-upstart-name
Reviewer Review Type Date Requested Status
Upstart Reviewers Pending
Review via email: mp+195238@code.launchpad.net
To post a comment you must log in.
1574. By James Hunt

* Replace inadvertently dropped copyright symbol.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ChangeLog'
2--- ChangeLog 2013-11-14 14:28:26 +0000
3+++ ChangeLog 2013-11-14 15:20:21 +0000
4@@ -1,5 +1,12 @@
5 2013-11-14 James Hunt <james.hunt@ubuntu.com>
6
7+ * test/test_util_common.c: _start_upstart(): Set name to
8+ "test_init" for consistency with TEST_DBUS() and to make it
9+ easier to avoid killing non-test Session Inits when developing
10+ new tests.
11+
12+2013-11-14 James Hunt <james.hunt@ubuntu.com>
13+
14 * NEWS: Release 1.11
15
16 2013-11-13 James Hunt <james.hunt@ubuntu.com>
17
18=== modified file 'test/test_util_common.c'
19--- test/test_util_common.c 2013-11-12 12:17:30 +0000
20+++ test/test_util_common.c 2013-11-14 15:20:21 +0000
21@@ -489,8 +489,11 @@
22 TEST_NE (*pid = fork (), -1);
23
24 if (! *pid) {
25- int fd;
26+ char *argv0;
27+ int fd;
28+
29 nih_signal_reset ();
30+
31 sigprocmask (SIG_SETMASK, &orig_set, NULL);
32
33 if (! getenv ("UPSTART_TEST_VERBOSE")) {
34@@ -501,7 +504,14 @@
35 assert (dup2 (fd, STDERR_FILENO) != -1);
36 }
37
38- assert (execv (argv[0], argv) != -1);
39+ argv0 = argv[0];
40+
41+ /* Make the process stand out from existing non-test
42+ * Session Init processes.
43+ */
44+ argv[0] = "test_init";
45+
46+ assert (execvp (argv0, argv) != -1);
47 }
48
49 sigprocmask (SIG_SETMASK, &orig_set, NULL);

Subscribers

People subscribed via source and target branches