From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18599 invoked by alias); 17 Apr 2013 20:33:03 -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 18589 invoked by uid 89); 17 Apr 2013 20:33:03 -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 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:33:03 +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 r3HKWvtF003079 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 17 Apr 2013 16:32:57 -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 r3HKWq8N006580 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 17 Apr 2013 16:32:55 -0400 Date: Thu, 18 Apr 2013 05:37: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: <20130417203252.GA2090@host2.jankratochvil.net> References: <1365521265-28870-1-git-send-email-ARistovski@qnx.com> <1365521265-28870-9-git-send-email-ARistovski@qnx.com> <20130414141807.GF23227@host2.jankratochvil.net> <516D6AF8.3050103@qnx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <516D6AF8.3050103@qnx.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-04/txt/msg00548.txt.bz2 On Tue, 16 Apr 2013 17:15:04 +0200, Aleksandar Ristovski wrote: > On 13-04-14 10:18 AM, Jan Kratochvil wrote: > >On Tue, 09 Apr 2013 17:27:45 +0200, Aleksandar Ristovski wrote: > >>+ 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}'" > > > >Those .* around ${expected_line} destroy the whole purpose of ${nocrlf} as > >they can match anything. To make it really single-line one can use for > >example: > > I was aiming at matching ${symsloaded} and ${solibfile} on > _the_same_ line, but ignore if there are extra lines. I believe this > guards against e.g. > > ............. Yes ....... SomeOtherLibraryNotSureWhyMatchedTheRegexp > ............. No ......... ${solibfile} > > In this case, if 'Yes' is expected, it would not match. That was the purpose, it would FAIL as such case is unexpected and user should investigate/bugreport why it happened. (It would be absolutely correct to rather report UNRESOLVED rather than FILE in the unexpected multi-line case.) But if it was intentional how you wrote it I do not mind either way. > > set footer_line {\(\*\): Shared library is missing debugging information\.} > >+ > > "${expected_header}\r\n${nocrlf}${expected_line}${nocrlf}(?:\r\n$footer_line)?" \ > > > > > >>+ return 0 > > > >The return value (0) is not used by any caller. And also just "return" at and > >of proc is redundant, remove it. > > Actually, I was going to use it to communicate failures within the > function - changed accordingly. If something goes wrong in one run > of solib_matching_test, it will print UNTESTED and continue, I > believe this would aid diagnostics of the issues. OK, I found now the caller has been updated. Thanks, Jan