From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18022 invoked by alias); 15 Aug 2012 00:53:06 -0000 Received: (qmail 18010 invoked by uid 22791); 15 Aug 2012 00:53:05 -0000 X-SWARE-Spam-Status: No, hits=-4.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 15 Aug 2012 00:52:51 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1T1Rqr-0001u8-Ua from Yao_Qi@mentor.com ; Tue, 14 Aug 2012 17:52:49 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Tue, 14 Aug 2012 17:52:49 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.1.289.1; Tue, 14 Aug 2012 17:52:48 -0700 Message-ID: <502AF2C3.4090507@codesourcery.com> Date: Wed, 15 Aug 2012 00:53:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120717 Thunderbird/14.0 MIME-Version: 1.0 To: Tom Tromey CC: Subject: Re: RFC: consolidate checks for _Unwind_DebugHook in test suite References: <877gt1zbr5.fsf@fleche.redhat.com> In-Reply-To: <877gt1zbr5.fsf@fleche.redhat.com> Content-Type: text/plain; charset="ISO-8859-1"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-08/txt/msg00425.txt.bz2 On 08/15/2012 12:20 AM, Tom Tromey wrote: > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index 17e2117..daa50f5 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -2093,6 +2093,43 @@ proc skip_hw_watchpoint_access_tests {} { > return 0 > } > > +# Return 1 if we should skip tests that require the runtime unwinder > +# hook. This must be invoked while gdb is running, after shared > +# libraries have been loaded. This is needed because otherwise a > +# shared libgcc won't be visible. > + > +proc skip_unwinder_tests {} { > + global gdb_prompt > + > + set ok 1 > + gdb_test_multiple "print _Unwind_DebugHook" "check for unwinder hook" { > + -re "= .*no debug info.*_Unwind_DebugHook.*\r\n$gdb_prompt $" { > + # Pass the test so we don't get bogus fails in the results. > + pass "check for unwinder hook" Do we really need to put "pass" here? skip_* proc in lib/gdb.exp is to do some check and return a boolean value. We don't have to generate any PASS or FAIL during checking. I'd like to remove them. > + set ok 0 > + } > + -re "= .*_Unwind_DebugHook.*\r\n$gdb_prompt $" { > + pass "check for unwinder hook" > + } > + -re "No symbol .* in current context.\r\n$gdb_prompt $" { > + # Pass the test so we don't get bogus fails in the results. > + pass "check for unwinder hook" > + set ok 0 > + } > + } > + if {!$ok} { > + gdb_test_multiple "info probe" "check for stap probe in unwinder" { > + -re ".*libgcc.*unwind.*\r\n$gdb_prompt $" { > + pass "check for stap probe in unwinder" > + set ok 1 > + } > + -re "\r\n$gdb_prompt $" { > + } > + } > + } > + return $ok > +} > + -- Yao