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]

[PATCH] Add more cases for control limits


	* testsuite/systemtap.base/control_limits.exp: New test case
	* testsuite/systemtap.base/control_limits.stp: New test file
---
 testsuite/systemtap.base/control_limits.exp | 83 +++++++++++++++++++++++++++++
 testsuite/systemtap.base/control_limits.stp | 11 ++++
 2 files changed, 94 insertions(+)

diff --git a/testsuite/systemtap.base/control_limits.exp b/testsuite/systemtap.base/control_limits.exp
index 4b68604..29ef03e 100644
--- a/testsuite/systemtap.base/control_limits.exp
+++ b/testsuite/systemtap.base/control_limits.exp
@@ -22,6 +22,26 @@ foreach runtime [get_runtime_list] {
 }
 
 foreach runtime [get_runtime_list] {
+    set test "control_limits MAXNESTING proper"
+    if {$runtime != ""} {
+	lappend test "($runtime)"
+	spawn stap -u -DMAXNESTING=8 $srcdir/$subdir/control_limits.stp \
+	    --runtime=$runtime
+    } else {
+	spawn stap -u -DMAXNESTING=8 $srcdir/$subdir/control_limits.stp
+    }
+    set ko 0
+    expect {
+	-timeout 150
+	-re {ERROR.*MAXNESTING} { incr ko; exp_continue }
+	timeout { fail "$test (timeout)" }
+	eof { }
+    }
+    catch {close}; catch {wait}
+    if {$ko == 0} { pass "$test ($ko)" } { fail "$test ($ko)" }
+}
+
+foreach runtime [get_runtime_list] {
     set test "control_limits MAXACTION"
     if {$runtime != ""} {
 	lappend test "($runtime)"
@@ -43,6 +63,69 @@ foreach runtime [get_runtime_list] {
 }
 
 foreach runtime [get_runtime_list] {
+    set test "control_limits MAXACTION proper"
+    if {$runtime != ""} {
+	lappend test "($runtime)"
+	spawn stap -u -DMAXACTION_INTERRUPTIBLE=502 \
+	    $srcdir/$subdir/control_limits.stp --runtime=$runtime 
+    } else {
+	spawn stap -u -DMAXACTION_INTERRUPTIBLE=502 \
+	    $srcdir/$subdir/control_limits.stp
+    }
+    set ko 0
+    expect {
+	-timeout 150
+	-re {ERROR.*MAXACTION} { incr ko; exp_continue }
+	timeout { fail "$test (timeout)" }
+	eof { }
+    }
+    catch {close}; catch {wait}
+    if {$ko == 0} { pass "$test ($ko)" } { fail "$test ($ko)" }
+}
+
+foreach runtime [get_runtime_list] {
+    set test "control_limits MAXMAPENTRIES"
+    if {$runtime != ""} {
+	lappend test "($runtime)"
+	spawn stap -u -D MAXMAPENTRIES=19 \
+	    $srcdir/$subdir/control_limits.stp --runtime=$runtime 
+    } else {
+	spawn stap -u -D MAXMAPENTRIES=19 \
+	    $srcdir/$subdir/control_limits.stp
+    }
+    set ok 0
+    expect {
+	-timeout 150
+	-re {ERROR.*MAXMAPENTRIES} { incr ok; exp_continue }
+	timeout { fail "$test (timeout)" }
+	eof { }
+    }
+    catch {close}; catch {wait}
+    if {$ok == 1} { pass "$test ($ok)" } { fail "$test ($ok)" }
+}
+
+foreach runtime [get_runtime_list] {
+    set test "control_limits MAXMAPENTRIES proper"
+    if {$runtime != ""} {
+	lappend test "($runtime)"
+	spawn stap -u -D MAXMAPENTRIES=20 \
+	    $srcdir/$subdir/control_limits.stp --runtime=$runtime 
+    } else {
+	spawn stap -u -D MAXMAPENTRIES=20 \
+	    $srcdir/$subdir/control_limits.stp
+    }
+    set ko 0
+    expect {
+	-timeout 150
+	-re {ERROR.*MAXMAPENTRIES} { incr ko; exp_continue }
+	timeout { fail "$test (timeout)" }
+	eof { }
+    }
+    catch {close}; catch {wait}
+    if {$ko == 0} { pass "$test ($ko)" } { fail "$test ($ko)" }
+}
+
+foreach runtime [get_runtime_list] {
     set test "control_limits MAXSTRINGLEN small"
     if {$runtime != ""} {
 	lappend test "($runtime)"
diff --git a/testsuite/systemtap.base/control_limits.stp b/testsuite/systemtap.base/control_limits.stp
index 89b0bae..0453ac8 100644
--- a/testsuite/systemtap.base/control_limits.stp
+++ b/testsuite/systemtap.base/control_limits.stp
@@ -12,6 +12,17 @@ probe begin {
   for (i=0; i<498; i++) {}
 }
 
+global array
+
+# for MAXMAPENTRIES testing
+probe begin {
+	i=0
+	while (i<20) {
+		array[i]=100
+		i++
+	}
+}
+
 # for MAXSTRINGLEN testing
 probe begin {
   s = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678" # last 8 will be \0'd
-- 
1.8.3.1




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