From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22153 invoked by alias); 23 Dec 2015 17:46:26 -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 21434 invoked by uid 89); 23 Dec 2015 17:46:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.9 required=5.0 tests=AWL,BAYES_00,BODY_8BITS,GARBLED_BODY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=ltp, sleep, HContent-Transfer-Encoding:8bit X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 23 Dec 2015 17:46:24 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id 4B27FC0B931C; Wed, 23 Dec 2015 17:46:23 +0000 (UTC) Received: from t540p.usersys.redhat.com (vpn-57-250.rdu2.redhat.com [10.10.57.250]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tBNHkKRd027375 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Dec 2015 12:46:22 -0500 Subject: Re: [PATCH 3/3] Add new case for stress test To: =?UTF-8?B?WmhvdSwgV2Vuamlhbi/lkajmlofliZE=?= , "Frank Ch. Eigler" References: <1450164104-1508-1-git-send-email-zhouwj-fnst@cn.fujitsu.com> <1450164104-1508-3-git-send-email-zhouwj-fnst@cn.fujitsu.com> <5670FC2F.8020609@cn.fujitsu.com> Cc: systemtap@sourceware.org From: David Smith Message-ID: <567ADDEC.7080707@redhat.com> Date: Wed, 23 Dec 2015 17:46:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <5670FC2F.8020609@cn.fujitsu.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-q4/txt/msg00305.txt.bz2 On 12/15/2015 11:52 PM, "Zhou, Wenjian/周文剑" wrote: > On 12/15/2015 08:41 PM, Frank Ch. Eigler wrote: >> >> zhouwj-fnst wrote: >> >>> [...] >>> +proc gen_load {} { >>> + # if 'genload' from the ltp exists, use it to create a real load >>> + set genload {/usr/local/ltp/testcases/bin/genload} >>> + if [file executable $genload] { >>> [...] >> >> How about using the same logic used in lib/stap_run.exp looking for >> /usr/bin/stress? Or $PATH searching? That /usr/local/ltp path is >> just not a good fit for general installations. >> > > Hello Frank, > > +proc gen_load {} { > + # if 'genload' from the ltp exists, use it to create a real load > + set genload {/usr/local/ltp/testcases/bin/genload} > + if [file executable $genload] { > + exec $genload -c 10 -i 10 -m 10 -t 10 > + # ^^^^^ run for 10 seconds > + # ^^^^^ 10 procs spinning on malloc > + # ^^^^^ 10 procs spinning on sync > + # ^^^^^ 10 procs spinning on sqrt > + } else { > + # sleep for a bit > + wait_n_secs 10 > > "wait_n_secs" is the function in stap_run.exp. > If /usr/local/ltp/testcases/bin/genload is not exist, it will look for > /usr/bin/stress. I think Frank means we should search the path for 'genload', instead of just looking for it in /usr/local/ltp/testcases/bin. The easiest way to do that would be to look at the output of 'which genload'. If that was empty, you could then look in /usr/local/ltp/testcases/bin. > I just use the same logic of the other tests in stress. > Do you mean "set genload" should be removed ? It looks like testsuite/systemtap.stress/all_kernel_functions.exp and testsuite/systemtap.stress/current.exp also have a genload function. Perhaps we should move/combine them all the genload functions into a new file in testsuite/lib that the 2 existing tests and your new test use. -- David Smith dsmith@redhat.com Red Hat http://www.redhat.com 256.217.0141 (direct) 256.837.0057 (fax)