summaryrefslogtreecommitdiffstats
path: root/testsuite/systemtap.base/rand.stp
blob: d584e5f79d643aa015e19c2e34ba07293db603e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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()
}