From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4826 invoked by alias); 14 Jun 2007 14:11:28 -0000 Received: (qmail 4818 invoked by uid 22791); 14 Jun 2007 14:11:27 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,FORGED_RCVD_HELO,SPF_HELO_PASS,SPF_PASS,TW_PM X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 14 Jun 2007 14:11:21 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.1/8.13.1) with ESMTP id l5EEBJ7g001089; Thu, 14 Jun 2007 10:11:19 -0400 Received: from pobox.hsv.redhat.com (pobox.hsv.redhat.com [172.16.16.12]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id l5EEBIEx018317; Thu, 14 Jun 2007 10:11:18 -0400 Received: from localhost.localdomain (dhcp-170.hsv.redhat.com [172.16.17.170]) by pobox.hsv.redhat.com (8.12.11.20060308/8.12.11) with ESMTP id l5EEBINj018162; Thu, 14 Jun 2007 10:11:18 -0400 Message-ID: <46714C84.1080003@redhat.com> Date: Thu, 14 Jun 2007 14:11:00 -0000 From: David Smith User-Agent: Thunderbird 2.0.0.0 (X11/20070419) MIME-Version: 1.0 To: Quentin Barnes CC: systemtap@sources.redhat.com Subject: Re: Generic test suite failures found with ARM testing References: <20070613205050.GA3218@urbana.css.mot.com> In-Reply-To: <20070613205050.GA3218@urbana.css.mot.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2007-q2/txt/msg00581.txt.bz2 Quentin Barnes wrote: > I've run across two test failures on ARM that are not ARM-specific. They > are with systemtap.samples/profile.exp and systemtap.samples/syscalls2.exp. > These tests fail for me because of the 128 character limit on strings. > > For example, with profile.exp the output being looked for is truncated: > staprun(4619) > kernel.function("sys_poll@/proj/cost/work/qbarnes/kprobes/work/usr/src/linux-2.6.21.4/fs/select.c:742").call > coun^M The reason why we haven't noticed this problem is that you are evidently compiling your kernel differently than we are. Here's what you'll see on any fedora/rhel kernel: staprun(24243) kernel.function("sys_poll@fs/select.c:742").call count=500 ttime=4980951 Evidently something in the rpmbuild process produces shorter source paths. > What's the best fix here? I see a few choices: > > 1) Don't build your kernel deeper than a few levels of directories > and expect the tests to work. This one is what is accidentally working for us. > 2) Up the max string length parameter MAXSTRINGLEN to be more robust. We could do this for a particular test, but I don't think we would want to do it in general - it would eat up too much memory. > 3) Modify these tests not to output the path with the function name. > 4) Something I didn't think of. I believe the following patch will fix the problem by removing the strcats. If this works for you I'll check it in. diff -u -p -r1.2 profile.stp --- testsuite/systemtap.samples/profile.stp 2 Apr 2007 20:30:30 -0000 1.2 +++ testsuite/systemtap.samples/profile.stp 14 Jun 2007 14:10:01 -0000 @@ -30,9 +30,9 @@ probe timer.ms(5000) { } probe end { foreach ([pid,syscall] in syscall_count-) { - log (command[pid] . "(" . sprint(pid) . ") " . syscall . - " count=" . sprint(syscall_count[pid,syscall]) . - " ttime=" . sprint(syscall_times[pid,syscall])) + printf("%s(%d) %s count=%d ttime=%d\n", command[pid], pid, syscall, + syscall_count[pid,syscall], syscall_times[pid,syscall]) + if (count++ > 30) next } } -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)