diff options
author | David Smith <dsmith@redhat.com> | 2009-09-24 08:11:09 -0500 |
---|---|---|
committer | David Smith <dsmith@redhat.com> | 2009-09-24 08:11:09 -0500 |
commit | c7687aa3f93a1c831b1c8f3f2e6271b9802923a5 (patch) | |
tree | 85a132723be8d07a4b806d7168b6cc83ae529e5f /testsuite | |
parent | d3e3db27d3410fe52e826ff4f76e5a84d192cbb2 (diff) | |
parent | 1c625307539ca5a0bae6a7a6e297f8d8841a8911 (diff) | |
download | systemtap-steved-c7687aa3f93a1c831b1c8f3f2e6271b9802923a5.tar.gz systemtap-steved-c7687aa3f93a1c831b1c8f3f2e6271b9802923a5.tar.xz systemtap-steved-c7687aa3f93a1c831b1c8f3f2e6271b9802923a5.zip |
Merge branch 'master' of ssh://sources.redhat.com/git/systemtap
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/systemtap.base/rand.exp | 3 | ||||
-rw-r--r-- | testsuite/systemtap.base/rand.stp | 19 |
2 files changed, 22 insertions, 0 deletions
diff --git a/testsuite/systemtap.base/rand.exp b/testsuite/systemtap.base/rand.exp new file mode 100644 index 00000000..9b372e18 --- /dev/null +++ b/testsuite/systemtap.base/rand.exp @@ -0,0 +1,3 @@ +set test "rand" +set ::result_string {PASS} +stap_run2 $srcdir/$subdir/$test.stp diff --git a/testsuite/systemtap.base/rand.stp b/testsuite/systemtap.base/rand.stp new file mode 100644 index 00000000..d584e5f7 --- /dev/null +++ b/testsuite/systemtap.base/rand.stp @@ -0,0 +1,19 @@ +function checkStatus(status:long){ + if (status == 1){ + printf("%s\n","FAIL") + }else{ + printf("%s\n","PASS") + } +} + +probe begin +{ + status = 0 + for (i=1; i <= 100; i++){ + if (randint(i) < 0 || randint(i) > i) { + status = 1 + } + } + checkStatus(status) + exit() +} |