diff options
author | Mark Wielaard <mjw@redhat.com> | 2009-09-17 16:59:28 +0200 |
---|---|---|
committer | Mark Wielaard <mjw@redhat.com> | 2009-09-17 17:01:38 +0200 |
commit | 58e4e81606cd8da44d8efb28f798b66a2792cd49 (patch) | |
tree | f432cd94976c1e5c31e15c898eb774cbc229855b /testsuite/systemtap.base/vta-test.exp | |
parent | 24c7957b4dbddc8545d0e0c734377746a5ae6e60 (diff) | |
download | systemtap-steved-58e4e81606cd8da44d8efb28f798b66a2792cd49.tar.gz systemtap-steved-58e4e81606cd8da44d8efb28f798b66a2792cd49.tar.xz systemtap-steved-58e4e81606cd8da44d8efb28f798b66a2792cd49.zip |
Add a testcase for PR10417 support for DW_OP_{stack|implicit}_value.
Currently XFAILS when gcc-vta detected, otherwise UNTESTED.
* testsuite/systemtap.base/vta-test.exp: New test harness.
* testsuite/systemtap.base/vta-test.c: New test program.
* testsuite/systemtap.base/vta-test.stp: New test script.
Diffstat (limited to 'testsuite/systemtap.base/vta-test.exp')
-rw-r--r-- | testsuite/systemtap.base/vta-test.exp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/vta-test.exp b/testsuite/systemtap.base/vta-test.exp new file mode 100644 index 00000000..d1fadb6a --- /dev/null +++ b/testsuite/systemtap.base/vta-test.exp @@ -0,0 +1,34 @@ +set test "vta-test" +set ::result_string {i: 0x6 +i: 0xdeadbeef +i: 0xdeadbeef87654321} + +set test_flags "additional_flags=-g" +set test_flags "$test_flags additional_flags=-O2" +set test_flags "$test_flags additional_flags=-I$srcdir/../includes/sys" + +set res [target_compile $srcdir/$subdir/$test.c $test.exe executable "$test_flags"] +if { $res != "" } { + verbose "target_compile failed: $res" 2 + fail "$test.c compile" + untested "$test" + return +} else { + pass "$test.c compile" +} + +# Test only when we are running an install test (can execute) and when gcc +# vta generated DW_OP_{stack|implicit}_values for us. See PR10417. +if {[installtest_p] && [uprobes_p]} { + # See if GCC produce DW_OP_implicit_value and/or DW_OP_stack_value for us. + set regexp {[stack|implicit]_value} + if {![catch {exec readelf --debug-dump=loc vta-test.exe | egrep "$regexp"}]} { + setup_xfail 10417 "*-*-*" + stap_run $srcdir/$subdir/$test.stp -c ./$test.exe + } { + untested "$test (no-gcc-vta)" + } +} else { + untested "$test" +} +catch {exec rm -f $test.exe} |