summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/bz5274.exp
diff options
context:
space:
mode:
authorSrikar Dronamraju <srikar@linux.vnet.ibm.com>2008-10-28 16:13:01 -0400
committerFrank Ch. Eigler <fche@elastic.org>2008-10-28 16:13:01 -0400
commit3cec42574e444b7f91e2d887527bea45348ffb79 (patch)
tree658f46bbca4cd663d25e751d47ba5551582fd009 /testsuite/systemtap.base/bz5274.exp
parentd4b35e96eab28e96353b53954111662cf76ced2d (diff)
downloadsystemtap-steved-3cec42574e444b7f91e2d887527bea45348ffb79.tar.gz
systemtap-steved-3cec42574e444b7f91e2d887527bea45348ffb79.tar.xz
systemtap-steved-3cec42574e444b7f91e2d887527bea45348ffb79.zip
PR5274: uretprobe vs. longjmp support
Diffstat (limited to 'testsuite/systemtap.base/bz5274.exp')
-rwxr-xr-xtestsuite/systemtap.base/bz5274.exp50
1 files changed, 50 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/bz5274.exp b/testsuite/systemtap.base/bz5274.exp
new file mode 100755
index 00000000..6e95a58b
--- /dev/null
+++ b/testsuite/systemtap.base/bz5274.exp
@@ -0,0 +1,50 @@
+set test "./bz5274"
+set tpath "$srcdir/$subdir/$test"
+set arch [exec uname -m]
+
+if {$arch == "ppc64"} {
+ catch {exec gcc -o $test -g -m64 $srcdir/$subdir/$test.c} err
+} else {
+ catch {exec gcc -o $test -g $srcdir/$subdir/$test.c} err
+}
+
+
+if {$err == "" && [file exists $test]} then { pass "$test compile"
+} else {fail "$test compile"}
+
+if {! [installtest_p]} { untested "$test -p5"; return }
+
+
+if {[catch {exec stap $tpath.stp -c "$srcdir/$subdir/$test.sh"} res]} {
+ untested "$test longjmp to a uretprobed function"
+ puts "$res"
+ # catch {exec rm -f $test.out}
+} else {
+ if {[catch {exec cmp $test.out $srcdir/$subdir/$test.exp_out} res]} {
+ fail "$test longjmp to a uretprobed function"
+ puts "$res"
+# catch {exec rm -f $test.out}
+ } else {
+ pass "$test longjmp to a uretprobed function"
+ # catch {exec rm -f $test.out}
+ }
+}
+
+if {[catch {exec stap $tpath.a.stp -c $srcdir/$subdir/$test.sh} res]} {
+ untested "$test longjmp to a non-uretprobed function"
+ puts "$res"
+ catch {exec rm -f $test.out $test}
+ return
+} else {
+ if {[catch {exec cmp $test.out $srcdir/$subdir/$test.exp_out} res]} {
+ fail "$test longjmp to a non-uretprobed function"
+ puts "$res"
+ catch {exec rm -f $test.out $test}
+ return
+ } else {
+ pass "$test longjmp to a non-uretprobed function"
+ catch {exec rm -f $test.out $test}
+ }
+}
+
+