diff options
author | Jim Keniston <jkenisto@us.ibm.com> | 2009-04-15 16:02:58 -0700 |
---|---|---|
committer | Jim Keniston <jkenisto@us.ibm.com> | 2009-04-15 16:02:58 -0700 |
commit | 900686f5e209099d493a15f4e36a5030dc0aa8be (patch) | |
tree | 405757c92915c516cd0ff28e217a000843573f3f /testsuite/systemtap.base/stmt_rel.stp | |
parent | 2020af07c2a7f58538874ce652b52a6883f7ada0 (diff) | |
parent | 7c2136cfc88d68cfc5eb490444dc25c7dc1c0632 (diff) | |
download | systemtap-steved-900686f5e209099d493a15f4e36a5030dc0aa8be.tar.gz systemtap-steved-900686f5e209099d493a15f4e36a5030dc0aa8be.tar.xz systemtap-steved-900686f5e209099d493a15f4e36a5030dc0aa8be.zip |
Merge branch 'master' of ssh://kenistoj@sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite/systemtap.base/stmt_rel.stp')
-rw-r--r-- | testsuite/systemtap.base/stmt_rel.stp | 71 |
1 files changed, 0 insertions, 71 deletions
diff --git a/testsuite/systemtap.base/stmt_rel.stp b/testsuite/systemtap.base/stmt_rel.stp deleted file mode 100644 index cfe77317..00000000 --- a/testsuite/systemtap.base/stmt_rel.stp +++ /dev/null @@ -1,71 +0,0 @@ -global stack2pp, stack2func, stack3pp, stack3func -global wildcardpp, wild_count - -probe kernel.statement("bio_init@fs/bio.c+2") { - # stack2 = tokenize(backtrace(), " ") - stack2func = probefunc() - stack2pp = pp() -} -probe kernel.statement("bio_init@fs/bio.c+3") { - # stack3 = tokenize(backtrace(), " " ) - stack3func = probefunc() - stack3pp = pp() -} - -probe kernel.statement("bio_put@fs/bio.c:*") { - line = tokenize(pp(),":") - line = tokenize("",":") - line = substr(line,0,strlen(line)-2) - wildcardpp[strtol(line,10)]++ - - if (wild_count++ <= 10) { - next - } - - stack2pp = tokenize(stack2pp,":") - stack2pp = tokenize("",":") - stack3pp = tokenize(stack3pp,":") - stack3pp = tokenize("",":") - - stack2line = strtol (substr(stack2pp,0,strlen(stack2pp)-2), 10) - stack3line = strtol (substr(stack3pp,0,strlen(stack3pp)-2), 10) - - # Did functions for both bio_init probes match? - if (stack2func == stack3func) { - printf ("PASS %s\n", stack2func) - } - else { - printf ("FAIL %s %s\n", stack2func, stack3func) - } - - # Was line # for bio_init probe +2 < line # for bio_init probe +3? - if ((stack2line + 1) == stack3line) { - printf ("PASS line number\n") - } - else { - printf ("FAIL line number %d %d\n", stack2line, stack3line) - } - - # This test does not take optimized code into account - # Was address for bio_init probe +2 < address for bio_init probe +3? - # if (stack2 < stack3) { - # printf ("PASS address\n") - # } - # else { - # printf ("FAIL address %s %s\n", stack2, stack3) - # } - - # Did wildcard probe hit at least 4 different statements? - foreach ([i] in wildcardpp) { - statement_count += 1 - } - if (statement_count >= 4) { - printf ("PASS wildcard\n") - } - else - { - printf ("FAIL wildcard %d\n", statement_count) - } - - exit() -} |