Merge lp:~vorlon/upstart/shell-error-message-match into lp:upstart

Proposed by Steve Langasek
Status: Merged
Merged at revision: 1533
Proposed branch: lp:~vorlon/upstart/shell-error-message-match
Merge into: lp:upstart
Diff against target: 36 lines (+6/-2)
2 files modified
ChangeLog (+4/-0)
init/tests/test_job_process.c (+2/-2)
To merge this branch: bzr merge lp:~vorlon/upstart/shell-error-message-match
Reviewer Review Type Date Requested Status
Upstart Reviewers Pending
Review via email: mp+185414@code.launchpad.net

Description of the change

Some Debian buildds use bash as /bin/sh. They shouldn't but this is allowed
by policy; so upstart's test suite shouldn't fail under such circumstances
because of keying on shell-specific output strings.

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
=== modified file 'ChangeLog'
--- ChangeLog 2013-09-13 04:43:00 +0000
+++ ChangeLog 2013-09-13 04:49:15 +0000
@@ -5,6 +5,10 @@
5 * extra/Makefile.am:5 * extra/Makefile.am:
6 - don't pass cflags from unrelated libraries when building, only6 - don't pass cflags from unrelated libraries when building, only
7 pass them to those bridges which use the relevant libraries.7 pass them to those bridges which use the relevant libraries.
8 * init/tests/test_job_process.c: adjust test case to not key on the
9 text of error messages which will vary depending on whether
10 /bin/sh is dash or bash; and use TEST_STR_MATCH so that in the
11 event of future failures, we know why it's failing.
812
92013-09-05 James Hunt <james.hunt@ubuntu.com>132013-09-05 James Hunt <james.hunt@ubuntu.com>
1014
1115
=== modified file 'init/tests/test_job_process.c'
--- init/tests/test_job_process.c 2013-07-01 23:15:19 +0000
+++ init/tests/test_job_process.c 2013-09-13 04:49:15 +0000
@@ -3068,7 +3068,7 @@
3068 TEST_NE_P (output, NULL);3068 TEST_NE_P (output, NULL);
30693069
3070 TEST_TRUE (fgets (buffer, sizeof(buffer), output));3070 TEST_TRUE (fgets (buffer, sizeof(buffer), output));
3071 TEST_EQ (fnmatch ("*sh*/this/command/does/not/exist*not found*", buffer, 0), 0);3071 TEST_STR_MATCH (buffer, "*sh:*/this/command/does/not/exist:*");
30723072
3073 TEST_FILE_END (output);3073 TEST_FILE_END (output);
3074 fclose (output);3074 fclose (output);
@@ -3555,7 +3555,7 @@
3555 TEST_NE_P (output, NULL);3555 TEST_NE_P (output, NULL);
35563556
3557 TEST_TRUE (fgets (buffer, sizeof(buffer), output));3557 TEST_TRUE (fgets (buffer, sizeof(buffer), output));
3558 TEST_EQ (fnmatch ("/proc/self/fd/9*/this/command/does/not/exist*not found*", buffer, 0), 0);3558 TEST_STR_MATCH (buffer, "/proc/self/fd/9*/this/command/does/not/exist:*");
35593559
3560 TEST_FILE_END (output);3560 TEST_FILE_END (output);
3561 fclose (output);3561 fclose (output);

Subscribers

People subscribed via source and target branches