]> sourceware.org Git - systemtap.git/commitdiff
Improved fork/vfork tests for RHEL5.
authorDavid Smith <dsmith@redhat.com>
Mon, 1 Nov 2010 20:37:23 +0000 (15:37 -0500)
committerDavid Smith <dsmith@redhat.com>
Mon, 1 Nov 2010 20:37:23 +0000 (15:37 -0500)
* testsuite/systemtap.clone/dtrace_fork_exec.exp: Improve output string to
  handle parent/child execution order differences.
* testsuite/systemtap.clone/dtrace_vfork_parent.c: Added include files to
  avoid compile error on RHEL5.
* testsuite/systemtap.clone/dtrace_vfork_parent.c: Ditto.

testsuite/systemtap.clone/dtrace_fork_exec.exp
testsuite/systemtap.clone/dtrace_fork_parent.c
testsuite/systemtap.clone/dtrace_vfork_parent.c

index 58d65078d04e7b2f6bbb16484d8ad5832a86ebc6..b81f7495b02917fe14a9bbe9959e6b3525c4b039 100644 (file)
@@ -13,7 +13,9 @@ proc run_test_prog {} {
     return 0
 }
 
-set output_string "parent - pid: \[0-9\]+\r\nparent - child pid: \[0-9\]+\r\nparent - child pid before exec: \[0-9\]+\r\nchild - pid: \[0-9\]+\r\nparent - finished\r\n"
+# Since we can't guarentee the order of parent/child execution, we
+# have to be flexible on output.
+set output_string "parent - pid: \[0-9\]+\r\nparent - child pid( before exec)?: \[0-9\]+\r\nparent - child pid( before exec)?: \[0-9\]+\r\nchild - pid: \[0-9\]+\r\nparent - finished\r\n"
 
 # Build everything (without semaphores)
 set TEST_NAME "dtrace_fork_exec1"
index 440987aeba98e4eec0d4ccbaf8d38e50863e3234..cb403ff0477409726d40b66645dded078acc64dd 100644 (file)
@@ -13,6 +13,8 @@
 #include <string.h>
 #include <sched.h>
 #include <errno.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 #include "dtrace_fork_parent_probes.h"
 
 #if !defined(USE_SEMAPHORES)
index bc0d851c0d1f2de4d0e517ff28695094763467b8..e4903fe55fe893361924f76b4ff433322923f8d7 100644 (file)
@@ -13,6 +13,8 @@
 #include <string.h>
 #include <sched.h>
 #include <errno.h>
+#include <sys/types.h>
+#include <sys/wait.h>
 #include "dtrace_vfork_parent_probes.h"
 
 #if !defined(USE_SEMAPHORES)
This page took 0.030304 seconds and 5 git commands to generate.