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 v2 1/3] fix the testcases so that the result will be more exact


Hello David,

How about it?
Should I change it to "printing only one success line"?

--
Thanks
Zhou

On 11/10/2015 03:47 PM, Zhou Wenjian wrote:
	* testsuite/lib/stap_run.exp: add pass_string

fix the output string:
	* testsuite/systemtap.base/be_order.exp
	* testsuite/systemtap.base/global_init.exp
	* testsuite/systemtap.base/logical_and.exp
	* testsuite/systemtap.base/tri.exp
	* testsuite/systemtap.base/global_vars.stp
	* testsuite/systemtap.base/timers.stp
	* testsuite/systemtap.stress/current.exp
---
  testsuite/lib/stap_run.exp               | 3 ++-
  testsuite/systemtap.base/be_order.exp    | 4 ++--
  testsuite/systemtap.base/global_init.exp | 4 ++--
  testsuite/systemtap.base/logical_and.exp | 4 ++--
  testsuite/systemtap.base/timers.exp      | 2 +-
  testsuite/systemtap.base/tri.exp         | 4 ++--
  testsuite/systemtap.stress/current.exp   | 2 +-
  7 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/testsuite/lib/stap_run.exp b/testsuite/lib/stap_run.exp
index f5780d0..48d1b8c 100755
--- a/testsuite/lib/stap_run.exp
+++ b/testsuite/lib/stap_run.exp
@@ -166,4 +166,5 @@ print_system_info
  # BZ692445 was fixed by removing the '$' at the end of
  # all_pass_string. Yet another expect regular expression oddity. The
  # '\r\n' is good enough at finding the EOL.
-set all_pass_string "(systemtap test success\r\n)+"
+set pass_string "(systemtap test success\r\n)"
+set all_pass_string "${pass_string}+"
diff --git a/testsuite/systemtap.base/be_order.exp b/testsuite/systemtap.base/be_order.exp
index eeae818..49e3b94 100755
--- a/testsuite/systemtap.base/be_order.exp
+++ b/testsuite/systemtap.base/be_order.exp
@@ -3,9 +3,9 @@
  set test "be_order"
  foreach runtime [get_runtime_list] {
      if {$runtime != ""} {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{2} \
  	    --runtime=$runtime
      } else {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{2}
      }
  }
diff --git a/testsuite/systemtap.base/global_init.exp b/testsuite/systemtap.base/global_init.exp
index 040ac44..d036a3f 100755
--- a/testsuite/systemtap.base/global_init.exp
+++ b/testsuite/systemtap.base/global_init.exp
@@ -4,9 +4,9 @@ set test "global_init"

  foreach runtime [get_runtime_list] {
      if {$runtime != ""} {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{2} \
  	    --runtime=$runtime
      } else {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{2}
      }
  }
diff --git a/testsuite/systemtap.base/logical_and.exp b/testsuite/systemtap.base/logical_and.exp
index 0e52e68..1134b38 100755
--- a/testsuite/systemtap.base/logical_and.exp
+++ b/testsuite/systemtap.base/logical_and.exp
@@ -4,9 +4,9 @@ set test "logical_and"

  foreach runtime [get_runtime_list] {
      if {$runtime != ""} {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{4} \
  	    --runtime=$runtime
      } else {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{4}
      }
  }
diff --git a/testsuite/systemtap.base/timers.exp b/testsuite/systemtap.base/timers.exp
index 70ed341..0f06c20 100755
--- a/testsuite/systemtap.base/timers.exp
+++ b/testsuite/systemtap.base/timers.exp
@@ -11,6 +11,6 @@ proc sleep_ten_secs {} {
  #check to see whether get the marker indicating the probe is loaded and running
  #should check to see whether exited for some reason
  #should be error is something else is printed.
-set output_string "(\\w+ = \\d+\r\n){7}${all_pass_string}(WARNING.*skipped.*)?"
+set output_string "(\\w+ = \\d+\r\n){7}${pass_string}{4}(WARNING.*skipped.*)?"

  stap_run $srcdir/$subdir/$test.stp sleep_ten_secs $output_string
diff --git a/testsuite/systemtap.base/tri.exp b/testsuite/systemtap.base/tri.exp
index c980284..2f600f4 100755
--- a/testsuite/systemtap.base/tri.exp
+++ b/testsuite/systemtap.base/tri.exp
@@ -4,9 +4,9 @@ set test "tri"

  foreach runtime [get_runtime_list] {
      if {$runtime != ""} {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string \
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{3} \
  	    --runtime=$runtime
      } else {
-	stap_run $srcdir/$subdir/$test.stp no_load $all_pass_string
+	stap_run $srcdir/$subdir/$test.stp no_load ${pass_string}{3}
      }
  }
diff --git a/testsuite/systemtap.stress/current.exp b/testsuite/systemtap.stress/current.exp
index 313b67a..46b8158 100755
--- a/testsuite/systemtap.stress/current.exp
+++ b/testsuite/systemtap.stress/current.exp
@@ -19,6 +19,6 @@ proc current_load {} {
      return 0
  }

-set output_string "(\\w+ = \\d+\r\n){5}${all_pass_string}(WARNING.*skipped.*)?"
+set output_string "(\\w+ = \\d+\r\n){5}${pass_string}{2}(WARNING.*skipped.*)?"

  stap_run $srcdir/$subdir/$test.stp current_load $output_string -g -w



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