diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-07-08 12:38:58 -0500 |
---|---|---|
committer | Frank Ch. Eigler <fche@elastic.org> | 2008-07-09 07:09:20 -0400 |
commit | a3ee6543b34b773568961e3d48f6ea30e65bc59c (patch) | |
tree | 51b90552e9b7cc9438d3108a13442d24fe1fd240 /testsuite/systemtap.base/declaration.exp | |
parent | 0b8f65798e0b454ccaab1d93925c3e034d4f5624 (diff) | |
download | systemtap-steved-a3ee6543b34b773568961e3d48f6ea30e65bc59c.tar.gz systemtap-steved-a3ee6543b34b773568961e3d48f6ea30e65bc59c.tar.xz systemtap-steved-a3ee6543b34b773568961e3d48f6ea30e65bc59c.zip |
Add test suite for declaration resolution
This adds the test declaration.exp which checks that specific named
declarations inside the kernel both fail and succeed. We get the
failure by only using a single compile unit which is currently known
to have the structure stubbed. We get exactly the same declaration to
succeed by adding a CU that is known to have the declaration.
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'testsuite/systemtap.base/declaration.exp')
-rw-r--r-- | testsuite/systemtap.base/declaration.exp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/declaration.exp b/testsuite/systemtap.base/declaration.exp new file mode 100644 index 00000000..16498819 --- /dev/null +++ b/testsuite/systemtap.base/declaration.exp @@ -0,0 +1,19 @@ +# Declaration tests. Specifically looking for resolution of +# DW_AT_declaration from another module + +set TEST_NAME "RESOLVE_FAIL" + +# this test just makes sure $device is still stubbed with DW_AT_declaration +set failscript { + probe\ module(\"libata\").function(\"ata_qc_issue\")\ \{\ print(\$qc->\$scsicmd->\$device->\$host->\$host_no)\ \}; +} + +stap_compile $TEST_NAME 0 $failscript + +set TEST_NAME "RESOLVE_PASS" + +set passscript { + probe\ module(\"scsi_mod\").function(\"scsi_request_fn\")\ \{print(\$q)\} +} + +stap_compile $TEST_NAME 1 [concat $passscript $failscript ]
\ No newline at end of file |