This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/2] rewrite the case typemismatch


Hello David,

I will describe the bug in typemismatch in the following.

On 12/01/2015 09:57 AM, Zhou Wenjian wrote:
	* testsuite/semko/typemismatch.stp: use the following cases to replace it

	* testsuite/semko/typemismatch1.stp
	* testsuite/semko/typemismatch2.stp
	* testsuite/semko/typemismatch3.stp
---
  testsuite/semko/typemismatch.stp  | 8 --------
  testsuite/semko/typemismatch1.stp | 8 ++++++++
  testsuite/semko/typemismatch2.stp | 4 ++++
  testsuite/semko/typemismatch3.stp | 3 +++
  4 files changed, 15 insertions(+), 8 deletions(-)
  delete mode 100755 testsuite/semko/typemismatch.stp
  create mode 100755 testsuite/semko/typemismatch1.stp
  create mode 100755 testsuite/semko/typemismatch2.stp
  create mode 100755 testsuite/semko/typemismatch3.stp

diff --git a/testsuite/semko/typemismatch.stp b/testsuite/semko/typemismatch.stp
deleted file mode 100755
index 94a49d5..0000000
--- a/testsuite/semko/typemismatch.stp
+++ /dev/null
@@ -1,8 +0,0 @@
-#! stap -p2
-
-
-global noo
-
-probe begin { foo = 1 ; foo = "bar" ; noo = 4 }
-
-probe end { foo = "zoo" ; foo <<< 2 ; noo = "zoo" }

The 'foo = 1; foo = "bar";' and 'foo = "zoo" ; foo <<< 2;' will just cause some warnings,
and won't cause error.
It means the case just have the same coverage as typemismatch1.stp in the following.

So I rewrite it by the following cases.

\ No newline at end of file
diff --git a/testsuite/semko/typemismatch1.stp b/testsuite/semko/typemismatch1.stp
new file mode 100755
index 0000000..e60b376
--- /dev/null
+++ b/testsuite/semko/typemismatch1.stp
@@ -0,0 +1,8 @@
+#! stap -p2
+
+
+global noo
+
+probe begin { noo = 4 }
+
+probe end { noo = "zoo" }
diff --git a/testsuite/semko/typemismatch2.stp b/testsuite/semko/typemismatch2.stp
new file mode 100755
index 0000000..940582e
--- /dev/null
+++ b/testsuite/semko/typemismatch2.stp
@@ -0,0 +1,4 @@
+#! stap -p2
+
+
+probe begin { foo = 1 ; foo = "bar" ;  print(foo) }
diff --git a/testsuite/semko/typemismatch3.stp b/testsuite/semko/typemismatch3.stp
new file mode 100755
index 0000000..74e367d
--- /dev/null
+++ b/testsuite/semko/typemismatch3.stp
@@ -0,0 +1,3 @@
+#! stap -p2
+
+probe begin { foo = "zoo" ; foo <<< 2 ; print(foo) }



--
Thanks
Zhou



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]