From c65358e84b38bc84951a4e3c5e8e4f3cace9f63e Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Thu, 25 Jun 2009 23:07:17 +0200 Subject: PR10323 Some ustack exelib.exp tests fail with prelinked shared libs. For shared libraries (.dynamic sections) we need the eh frame section address offset. This is the sh_addr if the shared library isn't prelinked (since the base load address is zero in that case), otherwise it is the module start address minus the bias (which also works for the non-prelinked case). * translate.cxx (get_unwind_data): Adjust eh_addr for module start and bias if module isn't absolute (has no relocations). * testsuite/systemtap.exelib/ustack.tcl: Accept all prelink tests. --- testsuite/systemtap.exelib/ustack.tcl | 3 --- 1 file changed, 3 deletions(-) (limited to 'testsuite') diff --git a/testsuite/systemtap.exelib/ustack.tcl b/testsuite/systemtap.exelib/ustack.tcl index 07dcec10..b70b8334 100644 --- a/testsuite/systemtap.exelib/ustack.tcl +++ b/testsuite/systemtap.exelib/ustack.tcl @@ -7,9 +7,6 @@ lib: lib_func=lib_func lib: lib_func=lib_func lib: lib_func=lib_func} -# BUG XXX PR10323 skip all prelink scenarios for now. -if {[string match "*prelink*" "$testname"]} { return } - # Only run on make installcheck if {! [installtest_p]} { untested "ustack-$testname"; return } if {! [utrace_p]} { untested "ustack-$testname"; return } -- cgit From f0d57904d70d912ca3fc82eeaaacccdac0307a87 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Fri, 26 Jun 2009 16:36:58 +0200 Subject: PR10335 systemtap.base/strftime.exp hangs. This only happened if there was a lot of cruft in the testsuite dir since expect wasn't "draining" the output of the spawned ls command for some reason. Work around it by just using tcl file globs to match. * testsuite/systemtap.base/strftime.exp: Test with glob and file exists. --- testsuite/systemtap.base/strftime.exp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'testsuite') diff --git a/testsuite/systemtap.base/strftime.exp b/testsuite/systemtap.base/strftime.exp index ad9e471d..decd7a65 100644 --- a/testsuite/systemtap.base/strftime.exp +++ b/testsuite/systemtap.base/strftime.exp @@ -7,15 +7,9 @@ system "rm -f %*" set format %%%S_%T exec stap -o $format -we {probe begin {println("hello");exit()}} -spawn ls -1 -set ok 0 -expect { - -re {%([0-9][0-9])_[0-9][0-9]:[0-9][0-9]:\1} {incr ok} - eof { } -} -wait +set file [glob -nocomplain -types f %\[0-9\]\[0-9\]_\[0-9\]\[0-9\]:\[0-9\]\[0-9\]:\[0-9\]\[0-9\]] -if {$ok == 1} { +if {[llength $file] == 1} { pass "$test (%S and %T)" } else { fail "$test (%S and %T)" @@ -27,19 +21,8 @@ set format %%,%C,%Y,%y,%m,%d,%e,%F,%H,%I,%j,%k,%l,%M,%R,%u,%w set date1 [exec date +$format] # run stapio with strftime exec stap -o $format -we {probe begin {println("hello");exit()}} -# check whether stap outputs stapio pid -set date2 [exec date +$format] - -spawn ls -1 -set ok 0 -expect { - $date1 {incr ok} - $date2 {incr ok} - eof { } -} -wait -if {$ok == 1} { +if {[file exists $date1]} { pass "$test (except %S and %T)" } else { fail "$test (except %S and %T)" -- cgit