* [PATCH] Add more cases for control limits
@ 2015-12-22 2:04 Zhou Wenjian
2015-12-23 16:34 ` David Smith
0 siblings, 1 reply; 2+ messages in thread
From: Zhou Wenjian @ 2015-12-22 2:04 UTC (permalink / raw)
To: systemtap
* testsuite/systemtap.base/control_limits.exp: New test case
* testsuite/systemtap.base/control_limits.stp: New test file
---
testsuite/systemtap.base/control_limits.exp | 83 +++++++++++++++++++++++++++++
testsuite/systemtap.base/control_limits.stp | 11 ++++
2 files changed, 94 insertions(+)
diff --git a/testsuite/systemtap.base/control_limits.exp b/testsuite/systemtap.base/control_limits.exp
index 4b68604..29ef03e 100644
--- a/testsuite/systemtap.base/control_limits.exp
+++ b/testsuite/systemtap.base/control_limits.exp
@@ -22,6 +22,26 @@ foreach runtime [get_runtime_list] {
}
foreach runtime [get_runtime_list] {
+ set test "control_limits MAXNESTING proper"
+ if {$runtime != ""} {
+ lappend test "($runtime)"
+ spawn stap -u -DMAXNESTING=8 $srcdir/$subdir/control_limits.stp \
+ --runtime=$runtime
+ } else {
+ spawn stap -u -DMAXNESTING=8 $srcdir/$subdir/control_limits.stp
+ }
+ set ko 0
+ expect {
+ -timeout 150
+ -re {ERROR.*MAXNESTING} { incr ko; exp_continue }
+ timeout { fail "$test (timeout)" }
+ eof { }
+ }
+ catch {close}; catch {wait}
+ if {$ko == 0} { pass "$test ($ko)" } { fail "$test ($ko)" }
+}
+
+foreach runtime [get_runtime_list] {
set test "control_limits MAXACTION"
if {$runtime != ""} {
lappend test "($runtime)"
@@ -43,6 +63,69 @@ foreach runtime [get_runtime_list] {
}
foreach runtime [get_runtime_list] {
+ set test "control_limits MAXACTION proper"
+ if {$runtime != ""} {
+ lappend test "($runtime)"
+ spawn stap -u -DMAXACTION_INTERRUPTIBLE=502 \
+ $srcdir/$subdir/control_limits.stp --runtime=$runtime
+ } else {
+ spawn stap -u -DMAXACTION_INTERRUPTIBLE=502 \
+ $srcdir/$subdir/control_limits.stp
+ }
+ set ko 0
+ expect {
+ -timeout 150
+ -re {ERROR.*MAXACTION} { incr ko; exp_continue }
+ timeout { fail "$test (timeout)" }
+ eof { }
+ }
+ catch {close}; catch {wait}
+ if {$ko == 0} { pass "$test ($ko)" } { fail "$test ($ko)" }
+}
+
+foreach runtime [get_runtime_list] {
+ set test "control_limits MAXMAPENTRIES"
+ if {$runtime != ""} {
+ lappend test "($runtime)"
+ spawn stap -u -D MAXMAPENTRIES=19 \
+ $srcdir/$subdir/control_limits.stp --runtime=$runtime
+ } else {
+ spawn stap -u -D MAXMAPENTRIES=19 \
+ $srcdir/$subdir/control_limits.stp
+ }
+ set ok 0
+ expect {
+ -timeout 150
+ -re {ERROR.*MAXMAPENTRIES} { incr ok; exp_continue }
+ timeout { fail "$test (timeout)" }
+ eof { }
+ }
+ catch {close}; catch {wait}
+ if {$ok == 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
+}
+
+foreach runtime [get_runtime_list] {
+ set test "control_limits MAXMAPENTRIES proper"
+ if {$runtime != ""} {
+ lappend test "($runtime)"
+ spawn stap -u -D MAXMAPENTRIES=20 \
+ $srcdir/$subdir/control_limits.stp --runtime=$runtime
+ } else {
+ spawn stap -u -D MAXMAPENTRIES=20 \
+ $srcdir/$subdir/control_limits.stp
+ }
+ set ko 0
+ expect {
+ -timeout 150
+ -re {ERROR.*MAXMAPENTRIES} { incr ko; exp_continue }
+ timeout { fail "$test (timeout)" }
+ eof { }
+ }
+ catch {close}; catch {wait}
+ if {$ko == 0} { pass "$test ($ko)" } { fail "$test ($ko)" }
+}
+
+foreach runtime [get_runtime_list] {
set test "control_limits MAXSTRINGLEN small"
if {$runtime != ""} {
lappend test "($runtime)"
diff --git a/testsuite/systemtap.base/control_limits.stp b/testsuite/systemtap.base/control_limits.stp
index 89b0bae..0453ac8 100644
--- a/testsuite/systemtap.base/control_limits.stp
+++ b/testsuite/systemtap.base/control_limits.stp
@@ -12,6 +12,17 @@ probe begin {
for (i=0; i<498; i++) {}
}
+global array
+
+# for MAXMAPENTRIES testing
+probe begin {
+ i=0
+ while (i<20) {
+ array[i]=100
+ i++
+ }
+}
+
# for MAXSTRINGLEN testing
probe begin {
s = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678" # last 8 will be \0'd
--
1.8.3.1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Add more cases for control limits
2015-12-22 2:04 [PATCH] Add more cases for control limits Zhou Wenjian
@ 2015-12-23 16:34 ` David Smith
0 siblings, 0 replies; 2+ messages in thread
From: David Smith @ 2015-12-23 16:34 UTC (permalink / raw)
To: Zhou Wenjian, systemtap
On 12/21/2015 08:03 PM, Zhou Wenjian wrote:
> * testsuite/systemtap.base/control_limits.exp: New test case
> * testsuite/systemtap.base/control_limits.stp: New test file
I've checked this in. Thanks!
--
David Smith
dsmith@redhat.com
Red Hat
http://www.redhat.com
256.217.0141 (direct)
256.837.0057 (fax)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-12-23 16:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-22 2:04 [PATCH] Add more cases for control limits Zhou Wenjian
2015-12-23 16:34 ` David Smith
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).