public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com>
To: <systemtap@sourceware.org>
Subject: [PATCH 2/3] Add new test case for buffer size
Date: Tue, 15 Dec 2015 07:23:00 -0000	[thread overview]
Message-ID: <1450164104-1508-2-git-send-email-zhouwj-fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1450164104-1508-1-git-send-email-zhouwj-fnst@cn.fujitsu.com>

	* testsuite/systemtap.base/stap_bufsize.exp: New test case
---
 testsuite/systemtap.base/stap_bufsize.exp | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 testsuite/systemtap.base/stap_bufsize.exp

diff --git a/testsuite/systemtap.base/stap_bufsize.exp b/testsuite/systemtap.base/stap_bufsize.exp
new file mode 100644
index 0000000..30088ed
--- /dev/null
+++ b/testsuite/systemtap.base/stap_bufsize.exp
@@ -0,0 +1,23 @@
+# Check set buffer size
+set test "buffer size"
+if {![installtest_p]} { untested "$test"; return }
+
+set ret 0
+
+if {[catch { exec sh -c "stap -s 1 -vvv -e 'probe begin{exit();}' 2>&1 | grep -q 'module options: _stp_bufsize=1'"}]} {
+    set ret 1
+}
+
+if {[catch { exec sh -c "stap -s 64 -vvv -e 'probe begin{exit();}' 2>&1 | grep -q 'module options: _stp_bufsize=64'"}]} {
+    set ret 1
+}
+
+if {[catch { exec sh -c "stap -s 4096 -vvv -e 'probe begin{exit();}' 2>&1 | grep -q 'Invalid buffer size (should be 1-4095).'"}]} {
+    set ret 1
+}
+
+if { $ret == 0 } {
+	pass $test
+} else {
+	fail $test
+}
-- 
1.8.3.1



  parent reply	other threads:[~2015-12-15  7:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15  7:23 [PATCH 1/3] Add new semko test case Zhou Wenjian
2015-12-15  7:23 ` [PATCH 3/3] Add new case for stress test Zhou Wenjian
2015-12-15 12:41   ` Frank Ch. Eigler
2015-12-16  5:54     ` "Zhou, Wenjian/周文剑"
2015-12-23 17:46       ` David Smith
2015-12-15  7:23 ` Zhou Wenjian [this message]
2015-12-23 17:58   ` [PATCH 2/3] Add new test case for buffer size David Smith
2015-12-23 17:59 ` [PATCH 1/3] Add new semko test case 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=1450164104-1508-2-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).