public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [PATCH 3/3] add new case for white space
  2015-12-07  9:07 [PATCH 1/3] add test cases for arith Zhou Wenjian
  2015-12-07  9:07 ` [PATCH 2/3] add more case for delete Zhou Wenjian
@ 2015-12-07  9:07 ` Zhou Wenjian
  2015-12-08 15:09 ` [PATCH 1/3] add test cases for arith Frank Ch. Eigler
  2 siblings, 0 replies; 6+ messages in thread
From: Zhou Wenjian @ 2015-12-07  9:07 UTC (permalink / raw)
  To: systemtap

	* testsuite/systemtap.base/whitespace.exp: new test case
	* testsuite/systemtap.base/whitespace.stp: new test file
---
 testsuite/systemtap.base/whitespace.exp | 13 +++++++++++++
 testsuite/systemtap.base/whitespace.stp | 14 ++++++++++++++
 2 files changed, 27 insertions(+)
 create mode 100644 testsuite/systemtap.base/whitespace.exp
 create mode 100644 testsuite/systemtap.base/whitespace.stp

diff --git a/testsuite/systemtap.base/whitespace.exp b/testsuite/systemtap.base/whitespace.exp
new file mode 100644
index 0000000..ee12594
--- /dev/null
+++ b/testsuite/systemtap.base/whitespace.exp
@@ -0,0 +1,13 @@
+# Check white space
+
+set test "whitespace"
+if {![installtest_p]} { untested "$test"; return }
+
+foreach runtime [get_runtime_list] {
+    if {$runtime != ""} {
+	stap_run $srcdir/$subdir/$test.stp no_load ($all_pass_string){2} \
+	    --runtime=$runtime
+    } else {
+	stap_run $srcdir/$subdir/$test.stp no_load ($all_pass_string){2}
+    }
+}
diff --git a/testsuite/systemtap.base/whitespace.stp b/testsuite/systemtap.base/whitespace.stp
new file mode 100644
index 0000000..9f06ce7
--- /dev/null
+++ b/testsuite/systemtap.base/whitespace.stp
@@ -0,0 +1,14 @@
+/*
+ * whitespace.stp
+ *
+ * Check white space
+ */
+
+
+probe begin
+{
+println("systemtap starting probe"); println("systemtap ending probe");     println("systemtap test success")
+;
+println("systemtap test success")
+    exit()
+}
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2/3] add more case for delete
  2015-12-07  9:07 [PATCH 1/3] add test cases for arith Zhou Wenjian
@ 2015-12-07  9:07 ` Zhou Wenjian
  2015-12-07  9:07 ` [PATCH 3/3] add new case for white space Zhou Wenjian
  2015-12-08 15:09 ` [PATCH 1/3] add test cases for arith Frank Ch. Eigler
  2 siblings, 0 replies; 6+ messages in thread
From: Zhou Wenjian @ 2015-12-07  9:07 UTC (permalink / raw)
  To: systemtap

	* testsuite/systemtap.maps/ii.exp: update for new test case
	* testsuite/systemtap.maps/ii.stp: add more test case
---
 testsuite/systemtap.maps/ii.exp | 12 ++++++++++++
 testsuite/systemtap.maps/ii.stp |  6 ++++++
 2 files changed, 18 insertions(+)

diff --git a/testsuite/systemtap.maps/ii.exp b/testsuite/systemtap.maps/ii.exp
index e32cd93..25fe354 100644
--- a/testsuite/systemtap.maps/ii.exp
+++ b/testsuite/systemtap.maps/ii.exp
@@ -18,6 +18,18 @@ foo[1] = 1
 foo[2] = 4
 foo[3] = 9
 foo[4] = 16
+foo[5] = 25
+foo[6] = 36
+foo[7] = 49
+foo[8] = 64
+foo[9] = 81
+foo[10] = 100
+
+foo[0] = 0
+foo[1] = 1
+foo[2] = 4
+foo[3] = 9
+foo[4] = 16
 foo[6] = 36
 foo[7] = 49
 foo[8] = 64
diff --git a/testsuite/systemtap.maps/ii.stp b/testsuite/systemtap.maps/ii.stp
index aaf6279..dbde15c 100644
--- a/testsuite/systemtap.maps/ii.stp
+++ b/testsuite/systemtap.maps/ii.stp
@@ -9,6 +9,12 @@ probe begin {
 	foreach (i in foo)
 	 	printf("foo[%d] = %d\n", i, foo[i])
 
+	# delete out of the index
+	delete foo[11]
+	printf("\n")
+	foreach (i in foo)
+	 	printf("foo[%d] = %d\n", i, foo[i])
+
 	# delete out of the middle
 	delete foo[5]
 	printf("\n")
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1/3] add test cases for arith
@ 2015-12-07  9:07 Zhou Wenjian
  2015-12-07  9:07 ` [PATCH 2/3] add more case for delete Zhou Wenjian
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Zhou Wenjian @ 2015-12-07  9:07 UTC (permalink / raw)
  To: systemtap

	* testsuite/systemtap.base/arith.stp: add more cases
---
 testsuite/systemtap.base/arith.stp | 29 ++++++++++++++++++++++++++++-
 1 file changed, 28 insertions(+), 1 deletion(-)

diff --git a/testsuite/systemtap.base/arith.stp b/testsuite/systemtap.base/arith.stp
index 84a8fb0..894ccb8 100644
--- a/testsuite/systemtap.base/arith.stp
+++ b/testsuite/systemtap.base/arith.stp
@@ -29,9 +29,22 @@ probe begin {
   test ("-", -1, 2-3)
   test ("==", 1, -1==-1)
   test ("!=", 1, -1!=1)
+  test (">", 1, 2>1)
+  test (">= (=)", 1, 1>=1)
+  test (">= (>)", 1, 2>=1)
+  test ("<", 1, -1<1)
+  test ("<= (=)", 1, 1<=1)
+  test ("<= (<)", 1, -1<=1)
+
   test ("== s", 1, "foobar"=="foobar")
-  test ("<= s", 1, "fooban"<="foobar")
+  test (">= s (=)", 1, "foobar">="foobar")
+  test ("<= s (=)", 1, "foobar"<="foobar")
+  test ("<= s (<)", 1, "fooban"<="foobar")
+  test (">= s (>)", 1, "xxx">="aaa")
   test ("> s", 1, "xxx">"aaa")
+  test ("< s", 1, "aaa"<"xxx")
+  test ("!= s", 1, "aaa"!="xxx")
+
   test ("<", 1, -1<0)
   test ("<", 1, 85723838<8273823892)
   test ("*", 100300400500, 1003004005 * 100)
@@ -65,8 +78,22 @@ probe begin {
   i=1; test ("i--", i--, 1)
   i=1; test ("i++", i++, 1)
   i=1; test ("+=", i+=4, 5) test ("after +=", i, 5)
+  i=2; test ("*=", i-=1, 1) test ("after -=", i, 1)
   i=5; test ("/=", i/=2, 2) test ("after /=", i, 2)
+  i=2; test ("*=", i*=2, 4) test ("after *=", i, 4)
+  i=3; test ("*=", i%=2, 1) test ("after %=", i, 1)
+  i=0xf; test (">>=", i>>=1, 7) test ("after >>=", i, 7)
+  i=0xf; test ("<<=", i<<=1, 30) test ("after <<=", i, 30)
+  i=0xf; test ("&=", i&=1, 1) test ("after &=", i, 1)
+  i=0xf; test ("^=", i^=1, 14) test ("after ^=", i, 14)
+  i=0xf; test ("|=", i|=1, 15) test ("after |=", i, 15)
+  i=+5; test ("+", i+5, 10)
+  i=-5; test ("+", i+5, 0)
+  i=5; test ("!", !i, 0)
+  i=0xf; test ("~", ~i, -16)
   a="1" b="2"; stest (".=", a .= b, "12") stest ("after .=", a, "12")
+
+  test ("?:", 5==5?1:2, 1)
 }
 
 
-- 
1.8.3.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] add test cases for arith
  2015-12-07  9:07 [PATCH 1/3] add test cases for arith Zhou Wenjian
  2015-12-07  9:07 ` [PATCH 2/3] add more case for delete Zhou Wenjian
  2015-12-07  9:07 ` [PATCH 3/3] add new case for white space Zhou Wenjian
@ 2015-12-08 15:09 ` Frank Ch. Eigler
  2015-12-09  9:43   ` "Zhou, Wenjian/周文剑"
  2 siblings, 1 reply; 6+ messages in thread
From: Frank Ch. Eigler @ 2015-12-08 15:09 UTC (permalink / raw)
  To: Zhou Wenjian; +Cc: systemtap


Hi -


Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com> writes:

> 	* testsuite/systemtap.base/arith.stp: add more cases
> [...]

I see nothing wrong with the proposed tests, but they seem to add very
little new coverage to the sorts of things thoroughly exercised
elsewhere.  This set of arith.stp operator tests are probably OK, just
because we have their siblings there, but whitespace.stp IMHO doesn't
do anything special.

(By the way, there are also all kinds of other contributions worth
considering, be it documentation or bug or features fixes.  We'd love
to mentor folks with any of these areas.)

- FChE

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] add test cases for arith
  2015-12-08 15:09 ` [PATCH 1/3] add test cases for arith Frank Ch. Eigler
@ 2015-12-09  9:43   ` "Zhou, Wenjian/周文剑"
  2015-12-09 21:40     ` David Smith
  0 siblings, 1 reply; 6+ messages in thread
From: "Zhou, Wenjian/周文剑" @ 2015-12-09  9:43 UTC (permalink / raw)
  To: Frank Ch. Eigler; +Cc: systemtap

On 12/08/2015 11:09 PM, Frank Ch. Eigler wrote:
>
> Hi -
>
>
> Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com> writes:
>
>> 	* testsuite/systemtap.base/arith.stp: add more cases
>> [...]
>
> I see nothing wrong with the proposed tests, but they seem to add very
> little new coverage to the sorts of things thoroughly exercised
> elsewhere.  This set of arith.stp operator tests are probably OK, just
> because we have their siblings there, but whitespace.stp IMHO doesn't
> do anything special.
>

Hi Frank,

The whitespace.stp tests that if the systemtap works well with white space
and null statement(";").
If you think it is not needed, I won't insist.

-- 
Thanks
Zhou

> (By the way, there are also all kinds of other contributions worth
> considering, be it documentation or bug or features fixes.  We'd love
> to mentor folks with any of these areas.)
>
> - FChE
>
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] add test cases for arith
  2015-12-09  9:43   ` "Zhou, Wenjian/周文剑"
@ 2015-12-09 21:40     ` David Smith
  0 siblings, 0 replies; 6+ messages in thread
From: David Smith @ 2015-12-09 21:40 UTC (permalink / raw)
  To: Zhou, Wenjian/周文剑, Frank Ch. Eigler; +Cc: systemtap

On 12/09/2015 03:41 AM, "Zhou, Wenjian/周文剑" wrote:
> On 12/08/2015 11:09 PM, Frank Ch. Eigler wrote:
>>
>> Hi -
>>
>>
>> Zhou Wenjian <zhouwj-fnst@cn.fujitsu.com> writes:
>>
>>>     * testsuite/systemtap.base/arith.stp: add more cases
>>> [...]
>>
>> I see nothing wrong with the proposed tests, but they seem to add very
>> little new coverage to the sorts of things thoroughly exercised
>> elsewhere.  This set of arith.stp operator tests are probably OK, just
>> because we have their siblings there, but whitespace.stp IMHO doesn't
>> do anything special.
>>
> 
> Hi Frank,
> 
> The whitespace.stp tests that if the systemtap works well with white space
> and null statement(";").
> If you think it is not needed, I won't insist.

I've checked in the arith and map delete test changes. 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] 6+ messages in thread

end of thread, other threads:[~2015-12-09 21:40 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-07  9:07 [PATCH 1/3] add test cases for arith Zhou Wenjian
2015-12-07  9:07 ` [PATCH 2/3] add more case for delete Zhou Wenjian
2015-12-07  9:07 ` [PATCH 3/3] add new case for white space Zhou Wenjian
2015-12-08 15:09 ` [PATCH 1/3] add test cases for arith Frank Ch. Eigler
2015-12-09  9:43   ` "Zhou, Wenjian/周文剑"
2015-12-09 21:40     ` 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).