upstart/upstart-remove-tests.patch

213 lines
5.8 KiB
Diff

diff -up upstart-0.6.3/nih-dbus/tests/test_dbus_connection.c.tests upstart-0.6.3/nih-dbus/tests/test_dbus_connection.c
--- upstart-0.6.3/nih-dbus/tests/test_dbus_connection.c.tests 2009-12-14 15:51:25.323430105 +0100
+++ upstart-0.6.3/nih-dbus/tests/test_dbus_connection.c 2009-12-14 15:51:25.323430105 +0100
@@ -1521,7 +1521,6 @@ main (int argc,
nih_error_init ();
test_connect ();
- test_bus ();
test_setup ();
test_server ();
diff -up upstart-0.6.3/nih/tests/test_child.c.tests upstart-0.6.3/nih/tests/test_child.c
--- upstart-0.6.3/nih/tests/test_child.c.tests 2009-12-14 15:51:25.910710749 +0100
+++ upstart-0.6.3/nih/tests/test_child.c 2009-12-14 15:51:25.888145178 +0100
@@ -328,186 +328,6 @@ test_poll (void)
nih_free (watch);
- /* Check that a signal raised from a traced child causes the reaper
- * to be called with a traced event and the event in the status
- * field. It should not be removed from the list since the child
- * hasn't gone away.
- */
- TEST_FEATURE ("with signal from traced child");
-
- TEST_CHILD (pid) {
- assert0 (ptrace (PTRACE_TRACEME, 0, NULL, NULL));
-
- raise (SIGSTOP);
- raise (SIGCHLD);
- pause ();
- exit (0);
- }
-
- waitid (P_PID, pid, &siginfo, WSTOPPED);
-
- assert0 (ptrace (PTRACE_SETOPTIONS, pid, NULL, PTRACE_O_TRACESYSGOOD));
- assert0 (ptrace (PTRACE_CONT, pid, NULL, SIGCONT));
-
- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-
- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_TRAPPED,
- my_handler, &watch);
-
- TEST_FREE_TAG (watch);
-
- handler_called = 0;
- last_data = NULL;
- last_pid = 0;
- last_event = -1;
- last_status = 0;
-
- nih_child_poll ();
-
- TEST_TRUE (handler_called);
- TEST_EQ (last_pid, pid);
- TEST_EQ (last_event, NIH_CHILD_TRAPPED);
- TEST_EQ (last_status, SIGCHLD);
- TEST_NOT_FREE (watch);
-
- assert0 (ptrace (PTRACE_DETACH, pid, NULL, 0));
-
- kill (pid, SIGTERM);
- waitid (P_PID, pid, &siginfo, WEXITED);
- nih_free (watch);
-
-
-#if HAVE_VALGRIND_VALGRIND_H
- /* These tests fail when running under valgrind.
- */
- if (! RUNNING_ON_VALGRIND) {
-#endif
- /* Check that when a traced child forks it causes the reaper
- * to be called with a ptrace event and the fork event in the
- * status field. It should not be removed from the list since the
- * child hasn't gone away.
- */
- TEST_FEATURE ("with fork by traced child");
-
- TEST_CHILD (pid) {
- assert0 (ptrace (PTRACE_TRACEME, 0, NULL, NULL));
-
- raise (SIGSTOP);
-
- child = fork ();
- assert (child >= 0);
-
- pause ();
-
- exit (0);
- }
-
- waitid (P_PID, pid, &siginfo, WSTOPPED);
-
- assert0 (ptrace (PTRACE_SETOPTIONS, pid, NULL,
- PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEFORK));
- assert0 (ptrace (PTRACE_CONT, pid, NULL, SIGCONT));
-
- /* Wait for ptrace to stop the parent (signalling the fork) */
- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-
- /* Will be able to get the child pid now, we have to do it here
- * because we want to wait on it to ensure the test is synchronous;
- * otherwise nih_child_poll() could actually eat the child event
- * before it returns -- normally we'd do this inside the handler,
- * so things would probably work (we iter the handlers for each
- * event, so you can add one).
- */
- data = 0;
- assert0 (ptrace (PTRACE_GETEVENTMSG, pid, NULL, &data));
- assert (data != 0);
- child = (pid_t)data;
-
- /* Wait for ptrace to stop the child, otherwise it might not be
- * ready for us to actually detach from.
- */
- waitid (P_PID, child, &siginfo, WSTOPPED | WNOWAIT);
-
- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_PTRACE,
- my_handler, &watch);
-
- TEST_FREE_TAG (watch);
-
- handler_called = 0;
- last_data = NULL;
- last_pid = 0;
- last_event = -1;
- last_status = 0;
-
- nih_child_poll ();
-
- TEST_TRUE (handler_called);
- TEST_EQ (last_pid, pid);
- TEST_EQ (last_event, NIH_CHILD_PTRACE);
- TEST_EQ (last_status, PTRACE_EVENT_FORK);
- TEST_NOT_FREE (watch);
-
- assert0 (ptrace (PTRACE_DETACH, child, NULL, SIGCONT));
- kill (child, SIGTERM);
-
- assert0 (ptrace (PTRACE_DETACH, pid, NULL, SIGCONT));
- kill (pid, SIGTERM);
- waitid (P_PID, pid, &siginfo, WEXITED);
- nih_free (watch);
-
-
- /* Check that when a traced child execs it causes the reaper
- * to be called with a ptrace event and the exec event in the
- * status field. It should not be removed from the list since the
- * child hasn't gone away.
- */
- TEST_FEATURE ("with exec by traced child");
-
- TEST_CHILD (pid) {
- assert0 (ptrace (PTRACE_TRACEME, 0, NULL, NULL));
-
- raise (SIGSTOP);
-
- execl ("/bin/true", "true", NULL);
- exit (255);
- }
-
- waitid (P_PID, pid, &siginfo, WSTOPPED);
-
- assert0 (ptrace (PTRACE_SETOPTIONS, pid, NULL,
- PTRACE_O_TRACESYSGOOD | PTRACE_O_TRACEEXEC));
- assert0 (ptrace (PTRACE_CONT, pid, NULL, SIGCONT));
-
- waitid (P_PID, pid, &siginfo, WSTOPPED | WNOWAIT);
-
- watch = nih_child_add_watch (NULL, pid, NIH_CHILD_PTRACE,
- my_handler, &watch);
-
- TEST_FREE_TAG (watch);
-
- handler_called = 0;
- last_data = NULL;
- last_pid = 0;
- last_event = -1;
- last_status = 0;
-
- nih_child_poll ();
-
- TEST_TRUE (handler_called);
- TEST_EQ (last_pid, pid);
- TEST_EQ (last_event, NIH_CHILD_PTRACE);
- TEST_EQ (last_status, PTRACE_EVENT_EXEC);
- TEST_NOT_FREE (watch);
-
- assert0 (ptrace (PTRACE_DETACH, pid, NULL, SIGCONT));
-
- waitid (P_PID, pid, &siginfo, WEXITED);
- nih_free (watch);
-#if HAVE_VALGRIND_VALGRIND_H
- }
-#endif
-
-
/* Check that we can watch for events from any process, which
* shouldn't be freed when the child dies.
*/
diff -up upstart-0.6.3/nih/tests/test_string.c.tests upstart-0.6.3/nih/tests/test_string.c
--- upstart-0.6.3/nih/tests/test_string.c.tests 2009-12-17 12:34:43.357844975 +0100
+++ upstart-0.6.3/nih/tests/test_string.c 2009-12-17 12:38:41.911484010 +0100
@@ -1511,8 +1511,6 @@ main (int argc,
test_array_copy ();
test_array_append ();
test_str_wrap ();
- test_str_screen_width ();
- test_str_screen_wrap ();
return 0;
}