------------------------------------------------------------
revno: 1403
committer: Steve Langasek <[email protected]>
branch nick: upstream
timestamp: Fri 2012-12-07 13:52:38 -0800
message:
Revert commit 1397; this was a deliberate change in rev 1387.
modified:
init/tests/test_job_process.c
--
lp:upstart
https://code.launchpad.net/~upstart-devel/upstart/trunk
Your team Upstart Reviewers is subscribed to branch lp:upstart.
To unsubscribe from this branch go to
https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'init/tests/test_job_process.c'
--- init/tests/test_job_process.c 2012-12-07 18:26:43 +0000
+++ init/tests/test_job_process.c 2012-12-07 21:52:38 +0000
@@ -128,7 +128,6 @@
TEST_ENVIRONMENT,
TEST_OUTPUT,
TEST_OUTPUT_WITH_STOP,
- TEST_SIGNALS,
TEST_FDS
};
@@ -241,21 +240,6 @@
fprintf(stdout, "ended\n");
fflush (NULL);
break;
- case TEST_SIGNALS:
- /* Write signal stats for child process to stdout */
- in = fopen("/proc/self/status", "r");
- if (! in) {
- abort();
- }
-
- while (fgets (buffer, sizeof (buffer), in) != NULL) {
- if (strstr (buffer, "SigBlk:") == buffer ||
- strstr (buffer, "SigIgn:") == buffer)
- fputs (buffer, out);
- }
-
- fclose(in);
- break;
case TEST_FDS:
/* Establish list of open (valid) and closed (invalid)
* file descriptors.
@@ -4601,96 +4585,6 @@
nih_free (class);
- /* Check that when the job process is execed that no unexpected
- * signals are blocked or ignored.
- */
- TEST_FEATURE ("ensure sane signal state with no console");
- TEST_HASH_EMPTY (job_classes);
-
- sprintf (function, "%d", TEST_SIGNALS);
-
- args[0] = argv0;
- args[1] = function;
- args[2] = filename;
- args[3] = NULL;
-
- class = job_class_new (NULL, "test", NULL);
- class->console = CONSOLE_NONE;
- job = job_new (class, "");
-
- pid = job_process_spawn (job, args, NULL, FALSE, -1, PROCESS_MAIN);
- TEST_GT (pid, 0);
-
- waitpid (pid, NULL, 0);
- output = fopen (filename, "r");
-
- TEST_NE_P (output, NULL);
-
- {
- unsigned long int value;
-
- /* No signals should be blocked */
- TEST_TRUE (fgets (filebuf, sizeof(filebuf), output));
- TEST_EQ (sscanf (filebuf, "SigBlk: %lx", &value), 1);
- TEST_EQ (value, 0x0);
-
- /* No signals should be ignored */
- TEST_TRUE (fgets (filebuf, sizeof(filebuf), output));
- TEST_EQ (sscanf (filebuf, "SigIgn: %lx", &value), 1);
- TEST_EQ (value, 0x0);
-
- TEST_FILE_END (output);
- }
-
- fclose (output);
- assert0 (unlink (filename));
-
- nih_free (class);
-
- /********************************************************************/
- TEST_FEATURE ("ensure sane signal state with log console");
- TEST_HASH_EMPTY (job_classes);
-
- sprintf (function, "%d", TEST_SIGNALS);
-
- args[0] = argv0;
- args[1] = function;
- args[2] = filename;
- args[3] = NULL;
-
- class = job_class_new (NULL, "test", NULL);
- class->console = CONSOLE_LOG;
- job = job_new (class, "");
-
- pid = job_process_spawn (job, args, NULL, FALSE, -1, PROCESS_MAIN);
- TEST_GT (pid, 0);
-
- waitpid (pid, NULL, 0);
- output = fopen (filename, "r");
-
- TEST_NE_P (output, NULL);
-
- {
- unsigned long int value;
-
- /* No signals should be blocked */
- TEST_TRUE (fgets (filebuf, sizeof(filebuf), output));
- TEST_EQ (sscanf (filebuf, "SigBlk: %lx", &value), 1);
- TEST_EQ (value, 0x0);
-
- /* No signals should be ignored */
- TEST_TRUE (fgets (filebuf, sizeof(filebuf), output));
- TEST_EQ (sscanf (filebuf, "SigIgn: %lx", &value), 1);
- TEST_EQ (value, 0x0);
-
- TEST_FILE_END (output);
- }
-
- fclose (output);
- assert0 (unlink (filename));
-
- nih_free (class);
-
/********************************************************************/
TEST_FEATURE ("ensure sane fds with no console");
TEST_HASH_EMPTY (job_classes);
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel