]> sourceware.org Git - systemtap.git/commitdiff
on-the-fly testsuite: stablify
authorFrank Ch. Eigler <fche@redhat.com>
Fri, 9 Oct 2015 01:15:03 +0000 (21:15 -0400)
committerFrank Ch. Eigler <fche@redhat.com>
Fri, 9 Oct 2015 01:15:03 +0000 (21:15 -0400)
Remove the "-g" flag from both {k,u}probe tests; it's not needed, and
for the kernel case can trigger weird hangs due to overriding of the
blacklist.  Relax the output matching patterns, perhaps due to
different ordering of task workqueues in 4.3.0-rc.  Produce more
diagnostics upon failure.

testsuite/systemtap.onthefly/kprobes_onthefly.exp
testsuite/systemtap.onthefly/onthefly_common.tcl
testsuite/systemtap.onthefly/uprobes_onthefly.exp

index eba913894cbf1be2c17df0029a6721c13f7fd4a3..1a326a1f3b5218186042ad72b736ce05eb7ed464 100644 (file)
@@ -30,17 +30,17 @@ proc run_stap {subtest args script} {
    set echo_loop "while \[ true \]; do /bin/echo 1>/dev/null; done"
    set echo_pid [exec sh -c $echo_loop &]
 
-   # We always need the DEBUG and -g flags
-   set args "$args -D DEBUG_STP_ON_THE_FLY -g"
+   # We always need the DEBUG flag
+   set args "$args -DDEBUG_STP_ON_THE_FLY"
 
    # The script we use uses @entry(), which uses maps underneath. Since we will
    # be stressing the system, we need to ensure we will have enough space for
    # many map items.
-   set args "$args -D MAXMAPENTRIES=100000"
+   set args "$args -DMAXMAPENTRIES=100000"
 
    # This test seems especially prone to exceeding the default overhead
    # threshold in the harder subtests. Disable overload checking.
-   set args "$args -D STP_NO_OVERLOAD"
+   set args "$args -DSTP_NO_OVERLOAD"
 
    # Run stap and catch any errors (we will rethrow it later)
    set err [catch {eval exec stap -e {$script} $args} out]
@@ -179,9 +179,9 @@ proc make_pattern {subtest start_enabled maxtoggles} {
    # If we're not starting as enabled, then the kprobes will be registered as
    # disabled.
    if {!$start_enabled} {
-      lappend pattern "* registering as disabled (kprobe) pidx ?"
-      lappend pattern "* registering as disabled (kprobe) pidx ?"
-      lappend pattern "* registering as disabled (kretprobe) pidx ?"
+      lappend pattern "* registering as disabled (k*probe) pidx ?"
+      lappend pattern "* registering as disabled (k*probe) pidx ?"
+      lappend pattern "* registering as disabled (k*probe) pidx ?"
    }
 
    # For each toggle:
@@ -197,15 +197,15 @@ proc make_pattern {subtest start_enabled maxtoggles} {
          lappend pattern "toggling"
          if {$start_enabled} {
             set start_enabled 0
-            lappend pattern "* disabling (kprobe) pidx ?"
-            lappend pattern "* disabling (kprobe) pidx ?"
-            lappend pattern "* disabling (kretprobe) pidx ?"
+            lappend pattern "* disabling (k*probe) pidx ?"
+            lappend pattern "* disabling (k*probe) pidx ?"
+            lappend pattern "* disabling (k*probe) pidx ?"
          } else {
             set start_enabled 1
             if {$i < $maxtoggles} {
-               lappend pattern "* enabling (kprobe) pidx ?"
-               lappend pattern "* enabling (kprobe) pidx ?"
-               lappend pattern "* enabling (kretprobe) pidx ?"
+               lappend pattern "* enabling (k*probe) pidx ?"
+               lappend pattern "* enabling (k*probe) pidx ?"
+               lappend pattern "* enabling (k*probe) pidx ?"
             }
          }
       }
index 8f82643b58ec6dbd8db32a2f5eedafa604d7766f..c8056e1847cce6227fe5bb53be9bb6599c7d3d92 100644 (file)
@@ -24,11 +24,10 @@ proc is_valid_output {output patterns} {
       set next_pattern [lindex $patterns [expr $i + 1]]
       if {[string match $next_pattern $line]} {
          incr i
-
       } else {
-         verbose -log "expected: $next_pattern"
-         verbose -log "received: $line"
-         return 0
+          verbose -log "expected: $next_pattern"
+          verbose -log "received: $line"
+          # continue; $i will be too small, but we can see more errors
       }
    }
 
@@ -36,8 +35,6 @@ proc is_valid_output {output patterns} {
    if {$i >= [expr [llength $patterns] - 1]} {
       return 1
    } else {
-      verbose -log "expected more patterns"
-      verbose -log "got to pattern index $i, but there are [llength $patterns] patterns"
       return 0
    }
 }
index bd601da3ffb15f43be5cb44304e77ab9b644791c..772dfdfec94279620507d8076fcfc3e44d066544 100644 (file)
@@ -19,13 +19,17 @@ proc run_stap {subtest args script} {
    # Now start the application
    set pid [exec ./$test.x &]
 
-   # We always need the DEBUG and -g flags
-   set args "$args -D DEBUG_STP_ON_THE_FLY -g"
+   # We always need the DEBUG flags
+   set args "$args -DDEBUG_STP_ON_THE_FLY"
 
    # The script we use uses @entry(), which uses maps underneath. Since we will
    # be stressing the system, we need to ensure we will have enough space for
    # many map items.
-   set args "$args -D MAXMAPENTRIES=100000"
+   set args "$args -DMAXMAPENTRIES=100000"
+
+   # This test seems especially prone to exceeding the default overhead
+   # threshold in the harder subtests. Disable overload checking.
+   set args "$args -DSTP_NO_OVERLOAD"
 
    # Run stap and catch any errors (we will rethrow it later)
    set err [catch {eval exec stap -e {$script} $args} out]
This page took 0.031612 seconds and 5 git commands to generate.