rpms/upstart/devel upstart-remove-tests.patch, NONE, 1.1 sources, 1.11, 1.12
Petr Lautrbach
plautrba at fedoraproject.org
Tue Dec 1 11:53:24 UTC 2009
Author: plautrba
Update of /cvs/pkgs/rpms/upstart/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23141
Modified Files:
sources
Added Files:
upstart-remove-tests.patch
Log Message:
upstart-remove-tests.patch moved to cvs from sources
upstart-remove-tests.patch:
nih-dbus/tests/test_dbus_connection.c | 1
nih/tests/test_child.c | 180 ----------------------------------
2 files changed, 181 deletions(-)
--- NEW FILE upstart-remove-tests.patch ---
diff --git a/nih-dbus/tests/test_dbus_connection.c b/nih-dbus/tests/test_dbus_connection.c
index 68074b2..498f4e5 100644
--- a/nih-dbus/tests/test_dbus_connection.c
+++ b/nih-dbus/tests/test_dbus_connection.c
@@ -1521,7 +1521,6 @@ main (int argc,
nih_error_init ();
test_connect ();
- test_bus ();
test_setup ();
test_server ();
diff --git a/nih/tests/test_child.c b/nih/tests/test_child.c
index 4c8c760..5ec8501 100644
--- a/nih/tests/test_child.c
+++ b/nih/tests/test_child.c
@@ -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.
*/
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/upstart/devel/sources,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -p -r1.11 -r1.12
--- sources 27 Nov 2009 14:26:05 -0000 1.11
+++ sources 1 Dec 2009 11:53:24 -0000 1.12
@@ -1,2 +1 @@
ef9d2704426423f75d1e0c309ecfceb4 upstart-0.6.3.tar.bz2
-c99c8dd6a238ec43243ad8cf3aa51837 upstart-remove-tests.patch
More information about the fedora-extras-commits
mailing list