1 # This file was written by Yao Qi <qiyao@cn.ibm.com>.
3 set testfile "hello-vfork"
4 set srcfile ${testfile}.c
5 set binfile ${testfile}
8 if [get_compiler_info $binfile] {
12 verbose "compiling source file now....."
13 if { [ltrace_compile $srcdir/$subdir/$srcfile $objdir/$subdir/$binfile executable debug ] != ""} {
14 send_user "Testcase compile failed, so all tests in this file will automatically fail.\n"
17 # set options for ltrace.
21 set exec_output [ltrace_runtest $objdir/$subdir $objdir/$subdir/$binfile]
23 # Check the output of this program.
24 verbose "ltrace runtest output: $exec_output\n"
25 if [regexp {ELF from incompatible architecture} $exec_output] {
26 fail "32-bit ltrace can not perform on 64-bit PUTs and rebuild ltrace in 64 bit mode!"
28 } elseif [ regexp {Couldn't get .hash data} $exec_output ] {
29 fail "Couldn't get .hash data!"
33 # Verify the output by checking numbers of print in main-vfork.ltrace.
34 ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace "_exit" 2
35 ltrace_verify_output ${objdir}/${subdir}/${testfile}.ltrace "vfork resumed" 2