upstart: Update test expection for double-forking daemons
The behavior here was changed in CL:3097231 to continue tracing the
main process until the expected number of forks has happened,
regardless of any exec calls.
BUG=b:232122437
TEST=FEATURES=test emerge-eve upstart
Change-Id: Ie112ac308db186fa0af059807dbaaae8a6dd8b3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/upstart/+/3646929
Reviewed-by: Allen Webb <allenwebb@google.com>
Tested-by: Fergus Dall <sidereal@google.com>
Commit-Queue: Fergus Dall <sidereal@google.com>
diff --git a/init/tests/test_job_process.c b/init/tests/test_job_process.c
index ee6d66d..399035c 100644
--- a/init/tests/test_job_process.c
+++ b/init/tests/test_job_process.c
@@ -4351,9 +4351,8 @@
class->expect = EXPECT_NONE;
- /* Check that should the process call exec() after fork() it ends
- * the tracing even if we haven't had enough forks yet and moves
- * the job into the running state.
+ /* Check that should the process call exec() after fork() we continue
+ * tracing if we haven't had enough forks yet.
*/
TEST_FEATURE ("with exec call by process after fork");
class->expect = EXPECT_DAEMON;
@@ -4390,11 +4389,11 @@
rewind (output);
TEST_EQ (job->goal, JOB_START);
- TEST_EQ (job->state, JOB_RUNNING);
+ TEST_EQ (job->state, JOB_SPAWNED);
TEST_EQ (job->pid[PROCESS_MAIN], pid);
TEST_EQ (job->trace_forks, 1);
- TEST_EQ (job->trace_state, TRACE_NONE);
+ TEST_EQ (job->trace_state, TRACE_NORMAL);
waitpid (job->pid[PROCESS_MAIN], &status, 0);
TEST_TRUE (WIFEXITED (status));