summaryrefslogtreecommitdiffstats
path: root/testsuite/semok
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/semok')
-rwxr-xr-xtestsuite/semok/cast.stp6
-rwxr-xr-xtestsuite/semok/thirtythree.stp6
2 files changed, 11 insertions, 1 deletions
diff --git a/testsuite/semok/cast.stp b/testsuite/semok/cast.stp
index 769335f2..14401886 100755
--- a/testsuite/semok/cast.stp
+++ b/testsuite/semok/cast.stp
@@ -14,4 +14,10 @@ probe begin {
// check modules generated from headers
println(@cast(0, "task_struct", "kernel<linux/sched.h>")->tgid)
println(@cast(0, "timeval", "<sys/time.h>")->tv_sec)
+
+ // make sure that bogus @casts can get optimized away
+ @cast(0, "task_struct")->no_such_field
+ @cast(0, "task_struct")->parent->no_such_field
+ @cast(0, "no_such_type")->tgid
+ @cast(0, "task_struct", "no_such_module")->tgid
}
diff --git a/testsuite/semok/thirtythree.stp b/testsuite/semok/thirtythree.stp
index 90070370..0f0cacf6 100755
--- a/testsuite/semok/thirtythree.stp
+++ b/testsuite/semok/thirtythree.stp
@@ -1,5 +1,9 @@
#! stap -p2
# Per bz3016, this should get through the semantic pass without warnings.
probe kernel.function("do_mpage_readpage") {
- printf("\n page->mapping %p",$page->mapping)
+ printf("\n page->mapping %p",$page->mapping)
+ %( kernel_v >= "2.6.22" %?
+ printf("\n page->first_page->mapping %p",$page->first_page->mapping)
+ %)
+
}