summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorhunt <hunt>2007-09-21 19:11:41 +0000
committerhunt <hunt>2007-09-21 19:11:41 +0000
commitc04d7a74fef8a5e9751db280ebfdf8245694d0e0 (patch)
tree9340706471ee077a3fe82db0f33a43192f9d4dfa /testsuite
parent387e9f1c0f722108a2569cb0bd5e45b236b800a7 (diff)
downloadsystemtap-steved-c04d7a74fef8a5e9751db280ebfdf8245694d0e0.tar.gz
systemtap-steved-c04d7a74fef8a5e9751db280ebfdf8245694d0e0.tar.xz
systemtap-steved-c04d7a74fef8a5e9751db280ebfdf8245694d0e0.zip
2007-09-21 Martin Hunt <hunt@redhat.com>
* systemtap.maps/linear*: Updated linear histogram tests.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/ChangeLog2
-rw-r--r--testsuite/systemtap.maps/linear.exp1
-rw-r--r--testsuite/systemtap.maps/linear_large.exp27
-rw-r--r--testsuite/systemtap.maps/linear_large.stp35
-rw-r--r--testsuite/systemtap.maps/linear_large_neg.exp27
-rw-r--r--testsuite/systemtap.maps/linear_large_neg.stp33
-rw-r--r--testsuite/systemtap.maps/linear_overunder.exp33
-rw-r--r--testsuite/systemtap.maps/linear_overunder.stp33
-rw-r--r--testsuite/systemtap.maps/linear_under.exp4
9 files changed, 193 insertions, 2 deletions
diff --git a/testsuite/ChangeLog b/testsuite/ChangeLog
index ea41e111..4c5d811b 100644
--- a/testsuite/ChangeLog
+++ b/testsuite/ChangeLog
@@ -1,5 +1,7 @@
2007-09-21 Martin Hunt <hunt@redhat.com>
+ * systemtap.maps/linear*: Updated linear histogram tests.
+
* lib/stap_run2.exp (stap_run2): Use send_log()
instead of puts to save failure context in the log.
diff --git a/testsuite/systemtap.maps/linear.exp b/testsuite/systemtap.maps/linear.exp
index 5023beab..5519ee11 100644
--- a/testsuite/systemtap.maps/linear.exp
+++ b/testsuite/systemtap.maps/linear.exp
@@ -37,6 +37,7 @@ value |-------------------------------------------------- count
1350 |@ 7
1400 | 3
1450 | 3
+ 1500 | 0
}
diff --git a/testsuite/systemtap.maps/linear_large.exp b/testsuite/systemtap.maps/linear_large.exp
new file mode 100644
index 00000000..51df3c92
--- /dev/null
+++ b/testsuite/systemtap.maps/linear_large.exp
@@ -0,0 +1,27 @@
+# Test linear histogram with large values
+
+set test "linear_large"
+set ::result_string {count=15
+sum=16730000000
+min=10000000
+max=10000000000
+avg=1115333333
+ value |-------------------------------------------------- count
+ 0 |@@@ 3
+ 100000000 |@@ 2
+ 200000000 | 0
+ 300000000 | 0
+ 400000000 | 0
+ 500000000 |@@@@@ 5
+ 600000000 | 0
+ 700000000 | 0
+ 800000000 | 0
+ 900000000 | 0
+ 1000000000 |@@@@ 4
+>1000000000 |@ 1
+
+}
+
+stap_run2 $srcdir/$subdir/$test.stp
+
+
diff --git a/testsuite/systemtap.maps/linear_large.stp b/testsuite/systemtap.maps/linear_large.stp
new file mode 100644
index 00000000..668a00d5
--- /dev/null
+++ b/testsuite/systemtap.maps/linear_large.stp
@@ -0,0 +1,35 @@
+global agg
+
+probe begin
+{
+ # Add items to the aggregate
+
+ agg <<< 10000000
+ agg <<< 10000000
+ agg <<< 10000000
+
+ agg <<< 100000000
+ agg <<< 100000000
+
+ agg <<< 500000000
+ agg <<< 500000000
+ agg <<< 500000000
+ agg <<< 500000000
+ agg <<< 500000000
+
+ agg <<< 1000000000
+ agg <<< 1000000000
+ agg <<< 1000000000
+ agg <<< 1000000000
+
+ agg <<< 10000000000
+
+ printf("count=%d\n", @count(agg))
+ printf("sum=%d\n", @sum(agg))
+ printf("min=%d\n", @min(agg))
+ printf("max=%d\n", @max(agg))
+ printf("avg=%d\n", @avg(agg))
+ print(@hist_linear(agg, 0, 1000000000, 100000000))
+
+ exit()
+}
diff --git a/testsuite/systemtap.maps/linear_large_neg.exp b/testsuite/systemtap.maps/linear_large_neg.exp
new file mode 100644
index 00000000..bdffba7b
--- /dev/null
+++ b/testsuite/systemtap.maps/linear_large_neg.exp
@@ -0,0 +1,27 @@
+# Test linear histogram with large negative numbers
+
+set test "linear_large_neg"
+set ::result_string {count=13
+sum=-16700000000
+min=-10000000000
+max=0
+avg=-1284615384
+ value |-------------------------------------------------- count
+<-1000000000 |@ 1
+ -1000000000 |@@@@ 4
+ -900000000 | 0
+ -800000000 | 0
+ -700000000 | 0
+ -600000000 | 0
+ -500000000 |@@@@@ 5
+ -400000000 | 0
+ -300000000 | 0
+ -200000000 | 0
+ -100000000 |@@ 2
+ 0 |@ 1
+
+}
+
+stap_run2 $srcdir/$subdir/$test.stp
+
+
diff --git a/testsuite/systemtap.maps/linear_large_neg.stp b/testsuite/systemtap.maps/linear_large_neg.stp
new file mode 100644
index 00000000..3a3e1685
--- /dev/null
+++ b/testsuite/systemtap.maps/linear_large_neg.stp
@@ -0,0 +1,33 @@
+global agg
+
+probe begin
+{
+ # Add items to the aggregate
+
+ agg <<< 0
+
+ agg <<< -100000000
+ agg <<< -100000000
+
+ agg <<< -500000000
+ agg <<< -500000000
+ agg <<< -500000000
+ agg <<< -500000000
+ agg <<< -500000000
+
+ agg <<< -1000000000
+ agg <<< -1000000000
+ agg <<< -1000000000
+ agg <<< -1000000000
+
+ agg <<< -10000000000
+
+ printf("count=%d\n", @count(agg))
+ printf("sum=%d\n", @sum(agg))
+ printf("min=%d\n", @min(agg))
+ printf("max=%d\n", @max(agg))
+ printf("avg=%d\n", @avg(agg))
+ print(@hist_linear(agg, -1000000000, 0, 100000000))
+
+ exit()
+}
diff --git a/testsuite/systemtap.maps/linear_overunder.exp b/testsuite/systemtap.maps/linear_overunder.exp
new file mode 100644
index 00000000..80b74c72
--- /dev/null
+++ b/testsuite/systemtap.maps/linear_overunder.exp
@@ -0,0 +1,33 @@
+# Test linear histogram over and underflow
+
+set test "linear_overunder"
+set ::result_string {count=1600
+sum=653400
+min=0
+max=1485
+avg=408
+value |-------------------------------------------------- count
+ <250 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 680
+ 250 |@@@@@@ 94
+ 300 |@@@@@ 79
+ 350 |@@@@@ 79
+ 400 |@@@@ 65
+ 450 |@@@@ 67
+ 500 |@@@ 55
+ 550 |@@@ 54
+ 600 |@@@ 51
+ 650 |@@@ 45
+ 700 |@@ 41
+ 750 |@@ 40
+ 800 |@@ 34
+ 850 |@@ 33
+ 900 |@@ 31
+ 950 |@ 27
+ 1000 |@ 23
+>1000 |@@@@@@@ 102
+
+}
+
+stap_run2 $srcdir/$subdir/$test.stp
+
+
diff --git a/testsuite/systemtap.maps/linear_overunder.stp b/testsuite/systemtap.maps/linear_overunder.stp
new file mode 100644
index 00000000..3350f982
--- /dev/null
+++ b/testsuite/systemtap.maps/linear_overunder.stp
@@ -0,0 +1,33 @@
+global agg
+
+probe begin
+{
+ # Add items to the aggregate
+ for (key=0; key < 100; key++) {
+ agg <<< key
+ agg <<< key * 2
+ agg <<< key * 3
+ agg <<< key * 4
+ agg <<< key * 5
+ agg <<< key * 6
+ agg <<< key * 7
+ agg <<< key * 8
+ agg <<< key * 9
+ agg <<< key * 10
+ agg <<< key * 11
+ agg <<< key * 12
+ agg <<< key * 12
+ agg <<< key * 13
+ agg <<< key * 14
+ agg <<< key * 15
+ }
+
+ printf("count=%d\n", @count(agg))
+ printf("sum=%d\n", @sum(agg))
+ printf("min=%d\n", @min(agg))
+ printf("max=%d\n", @max(agg))
+ printf("avg=%d\n", @avg(agg))
+ print(@hist_linear(agg, 250, 1000, 50))
+
+ exit()
+}
diff --git a/testsuite/systemtap.maps/linear_under.exp b/testsuite/systemtap.maps/linear_under.exp
index 39514241..8efc45be 100644
--- a/testsuite/systemtap.maps/linear_under.exp
+++ b/testsuite/systemtap.maps/linear_under.exp
@@ -7,9 +7,9 @@ min=0
max=99
avg=49
value |-------------------------------------------------- count
- 1800 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 100
+<1800 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 100
+ 1800 | 0
1900 | 0
- 2000 | 0
}