From: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>
To: <systemtap@sourceware.org>
Subject: [PATCH] Add more cases for control limits
Date: Tue, 22 Dec 2015 02:04:00 -0000 [thread overview]
Message-ID: <1450749790-30184-1-git-send-email-zhouwj-fnst@cn.fujitsu.com> (raw)
* 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
next reply other threads:[~2015-12-22 2:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-22 2:04 Zhou Wenjian [this message]
2015-12-23 16:34 ` David Smith
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1450749790-30184-1-git-send-email-zhouwj-fnst@cn.fujitsu.com \
--to=zhouwj-fnst@cn.fujitsu.com \
--cc=systemtap@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).