From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19612 invoked by alias); 16 Dec 2011 19:01:35 -0000 Received: (qmail 19604 invoked by uid 22791); 16 Dec 2011 19:01:34 -0000 X-SWARE-Spam-Status: No, hits=-5.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 16 Dec 2011 19:01:19 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pBGJ15IP027767 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 16 Dec 2011 14:01:15 -0500 Received: from toonder.wildebeest.org (ovpn-116-18.ams2.redhat.com [10.36.116.18]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id pBGIKw7m006150 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 16 Dec 2011 13:20:59 -0500 Received: by toonder.wildebeest.org (Postfix, from userid 1000) id 00DBF20C9A; Fri, 16 Dec 2011 19:20:57 +0100 (CET) Date: Fri, 16 Dec 2011 19:18:00 -0000 From: Mark Wielaard To: Wade Farnsworth Cc: systemtap@sourceware.org Subject: Re: Test suite results for ARM with uprobes Message-ID: <20111216182057.GA2526@toonder.wildebeest.org> References: <4EDE70F5.7000108@mentor.com> <1323262369.8528.57.camel@springer.wildebeest.org> <4EE0D5D8.2030906@mentor.com> <1323876723.3567.33.camel@springer.wildebeest.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="liOOAslEiF7prFVr" Content-Disposition: inline In-Reply-To: <1323876723.3567.33.camel@springer.wildebeest.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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: 2011-q4/txt/msg00379.txt.bz2 --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-length: 1834 On Wed, Dec 14, 2011 at 04:32:03PM +0100, Mark Wielaard wrote: > On Thu, 2011-12-08 at 08:20 -0700, Wade Farnsworth wrote: > > >> FAIL: semok/config_number.stp [semantic error: probe point mismatch > > at > > >> position 0] > > > > > > This one PASSes for me. > > > What is CONFIG_NR_CPU set to for your kernel? > > > It is set to 2 for me. > > > > > > > CONFIG_SMP is not set, so CONFIG_NR_CPU doesn't exist in my config > > file. > > Maybe stap treats that as being equal to zero? > > Yep it does. Although I am not sure it is meant to. It uses strtoll to > convert the empty string "", which returns zero, then it checks if errno > is set and it isn't, even though the man page says "The implementation > may also set errno to EINVAL in case no conversion was performed (no > digits seen, and 0 returned)." > > I don't know what is preferred. I could change the code to barf on an > empty string in a CONFIG_ numerical comparison, then we would need to > change the testcase to pick some other CONFIG_ option which is always > set. I think this is the most sane, but it is a slight change in how > things worked before (I think by accident). > > Or we could accept that numerical comparisons of CONFIG_ options which > aren't set compare to zero and then we change the testcase to also > accept that CONFIG_NR_CPU == 0. > > Opinions? Even though nobody gave their opinion, I did change mine. I have added an explicit test for the current behaviour. Non set CONFIG_options should compare equal to the empty string and/or zero. That also should make the test work on your setup. Even though I still think that is kind of ugly, it seems better to keep current behaviour that people/scripts might already depend on. And now if we do change it, we at least have a test that points out the change in behaviour. Cheers, Mark --liOOAslEiF7prFVr Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="config_nr_test.patch" Content-length: 887 commit 0a51c2a2dea8a2cafa0e642087547f48bfe0fa08 Author: Mark Wielaard Date: Fri Dec 16 19:14:40 2011 +0100 Check that unset CONFIG options compare equal the empty string and/or zero. diff --git a/testsuite/semok/config_number.stp b/testsuite/semok/config_number.stp index b384c3e..ba3bde7 100755 --- a/testsuite/semok/config_number.stp +++ b/testsuite/semok/config_number.stp @@ -1,14 +1,15 @@ #! stap -p2 # check that number comparisons work in CONFIG checks +# Note that unset CONFIG options compare equal the empty string and/or zero probe %( CONFIG_NR_CPUS == 13 %? noprobe %: - %( CONFIG_NR_CPUS < 1 %? + %( CONFIG_NR_CPUS != "" && CONFIG_NR_CPUS < 1 %? nonoprobe %: - %( CONFIG_NR_CPUS >= 0 %? + %( CONFIG_NR_CPUS >= 0 && CONFIG_NO_SUCH_FOOBAR_CONFIG_OPTION == 0 %? begin %: nononoprobe --liOOAslEiF7prFVr--