From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23951 invoked by alias); 17 Apr 2013 20:34:14 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 23941 invoked by uid 89); 17 Apr 2013 20:34:14 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_JC autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 17 Apr 2013 20:34:13 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r3HKXS0w003182 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Apr 2013 16:33:28 -0400 Received: from host2.jankratochvil.net (ovpn-116-84.ams2.redhat.com [10.36.116.84]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r3HKXLg6006682 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 17 Apr 2013 16:33:24 -0400 Date: Thu, 18 Apr 2013 10:15:00 -0000 From: Jan Kratochvil To: Aleksandar Ristovski Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 8/8] Tests for validate symbol file using build-id. Message-ID: <20130417203321.GD2090@host2.jankratochvil.net> References: <1365521265-28870-1-git-send-email-ARistovski@qnx.com> <1366127096-5744-1-git-send-email-ARistovski@qnx.com> <1366127096-5744-9-git-send-email-ARistovski@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1366127096-5744-9-git-send-email-ARistovski@qnx.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-04/txt/msg00552.txt.bz2 On Tue, 16 Apr 2013 17:44:56 +0200, Aleksandar Ristovski wrote: [...] > +proc solib_matching_test { solibfile symsloaded msg } { > + global gdb_prompt > + global testfile > + global executable > + global srcdir > + global subdir > + global binlibfiledirrun > + global binlibfiledirgdb > + global srcfile > + > + clean_restart ${binlibfiledirrun}/${executable} > + > + gdb_test_no_output "set solib-search-path \"${binlibfiledirgdb}\"" "" > + if { [gdb_test "cd ${binlibfiledirgdb}" "" ""] != 0 } { > + untested "cd ${binlibfiledirgdb}" > + return -1 > + } > + > + # Do not auto load shared libraries, the test needs to have control > + # over when the relevant output gets printed. > + gdb_test_no_output "set auto-solib-add off" "" > + > + if ![runto "${srcfile}:[gdb_get_line_number "set breakpoint 1 here"]"] { > + return -1 > + } > + > + gdb_test "sharedlibrary" "" "" > + > + set nocrlf "\[^\r\n\]*" > + set expected_header "From${nocrlf}To${nocrlf}Syms${nocrlf}Read${nocrlf}Shared${nocrlf}" > + set expected_line "${symsloaded}${nocrlf}${solibfile}" > + > + gdb_test "info sharedlibrary ${solibfile}" \ > + "${expected_header}\r\n.*${expected_line}.*" \ > + "${msg} - Symbols for ${solibfile} loaded: expected '${symsloaded}'" > + > + return 0 > +} > + > +# Copy binary to working dir so it pulls in the library from that dir > +# (by the virtue of $ORIGIN). > +file copy -force "${binlibfiledirgdb}/${executable}" \ > + "${binlibfiledirrun}/${executable}" > + > +# Test unstripped, .dynamic matching > +if { [solib_matching_test "${binlibfilebase}" "No" \ > + "test unstripped, .dynamic matching"] != 0 } { > + untested "test unstripped, .dynamic matching" I do not understand this message. "untested" means some tests were skipped. But here no tests are skipped. And the callee in one case already prints "untested" itself (cd ${binlibfiledirgdb}) and in other case it just prints FAIL without any "untested" output (runto). In the first case there will be two "untested" messages. When you are so corrected with "untested" messages make sure it is printed even in the failed "runto" case and also that "untested" is printed only once. > +} > + > +# Keep original so for debugging purposes > +file copy -force "${binlibfilegdb}" "${binlibfilegdb}-orig" > +set objcopy_program [transform objcopy] > +set result [catch "exec $objcopy_program --only-keep-debug ${binlibfilegdb}"] > +if {$result != 0} { > + untested "test --only-keep-debug (objcopy)" "untested" is inappropriate here because no tests are skipped. Either put also "return -1" here or remove the "untested" message. Maybe you meant "xfail" here, that something failed in the supporting system environment. > +} > + > +# Test --only-keep-debug, .dynamic matching so > +if { [solib_matching_test "${binlibfilebase}" "No" \ > + "test --only-keep-debug"] != 0 } { > + untested "test --only-keep-debug" Likewise probably "xfail". > +} > + > +# Keep previous so for debugging puroses > +file copy -force "${binlibfilegdb}" "${binlibfilegdb}-orig1" > + > +# Copy loaded so over the one gdb will find > +file copy -force "${binlibfilerun}" "${binlibfilegdb}" > + > +# Now test it does not mis-invalidate matching libraries > +if { [solib_matching_test "${binlibfilebase}" "Yes" \ > + "test matching libraries"] } { > + untested "test matching libraries" Likewise duplicate "untested" message. > +} > -- > 1.7.10.4 Thanks, Jan