From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39572 invoked by alias); 22 Dec 2015 02:04:49 -0000 Mailing-List: contact systemtap-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: systemtap-owner@sourceware.org Received: (qmail 39560 invoked by uid 89); 22 Dec 2015 02:04:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=1.7 required=5.0 tests=AWL,BAYES_50,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=502, ko, 436, H*r:ip*14.3.181.6 X-HELO: heian.cn.fujitsu.com Received: from cn.fujitsu.com (HELO heian.cn.fujitsu.com) (59.151.112.132) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 Dec 2015 02:04:47 +0000 Received: from unknown (HELO cn.fujitsu.com) ([10.167.33.5]) by heian.cn.fujitsu.com with ESMTP; 22 Dec 2015 10:04:42 +0800 Received: from G08CNEXCHPEKD02.g08.fujitsu.local (unknown [10.167.33.83]) by cn.fujitsu.com (Postfix) with ESMTP id 63B8F41887CA for ; Tue, 22 Dec 2015 10:04:32 +0800 (CST) Received: from localhost.localdomain (10.167.226.48) by G08CNEXCHPEKD02.g08.fujitsu.local (10.167.33.89) with Microsoft SMTP Server (TLS) id 14.3.181.6; Tue, 22 Dec 2015 10:04:32 +0800 From: Zhou Wenjian To: Subject: [PATCH] Add more cases for control limits Date: Tue, 22 Dec 2015 02:04:00 -0000 Message-ID: <1450749790-30184-1-git-send-email-zhouwj-fnst@cn.fujitsu.com> MIME-Version: 1.0 Content-Type: text/plain X-yoursite-MailScanner-ID: 63B8F41887CA.A5C3E X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: zhouwj-fnst@cn.fujitsu.com X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00299.txt.bz2 * 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