From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1753 invoked by alias); 27 Nov 2014 08:29:04 -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 1743 invoked by uid 89); 27 Nov 2014 08:29:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.3.2 X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 27 Nov 2014 08:29:02 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 2F4021166D2; Thu, 27 Nov 2014 03:29:01 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id BR5vWgc-T0R3; Thu, 27 Nov 2014 03:29:01 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 73B431165FE; Thu, 27 Nov 2014 03:29:00 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 9AC6840F79; Thu, 27 Nov 2014 12:28:56 +0400 (RET) Date: Thu, 27 Nov 2014 08:29:00 -0000 From: Joel Brobecker To: Sergio Durigan Junior Cc: Simon Marchi , gdb-patches@sourceware.org, Phil Muldoon Subject: Re: [PATCH] Fix test always passing in python/py-linetable.exp Message-ID: <20141127082856.GC5042@adacore.com> References: <1417026912-883-1-git-send-email-simon.marchi@ericsson.com> <878uixbrfg.fsf@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878uixbrfg.fsf@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-11/txt/msg00680.txt.bz2 > This fix makes sense to me. Escaping brackets are always a source of > confusion in TCL. Thanks for doing that. > > > Moreover, both in Python 2.7 and Python 3.3 the numbers don't have the L > > suffix, so now the test fails because of that. Anybody knows why they > > were there in the first place? I just tested with Python 2.4 and there > > are no Ls. > > Yeah, I don't know. My wild guess it that it was a thinko because of > the test just above it: > > gdb_test "python list_lines()" \ > "L20 A $hex.*L21 A $hex.*L22 A $hex.*L24 A $hex.*L25 A $hex.*L40 A $hex.*L42 A $hex.*L44 A $hex.*L42 A $hex.*L46 A $hex.*" \ > "test linetable iterator addr" > > Phil? > > > gdb/testsuite/ChangeLog: > > > > * gdb.python/py-linetable.exp: Properly escape sorted(fset) > > test expected output. Add parentheses for the call to print. > > Remove L suffix from integers. > > Two spaces after periods. Thanks, Sergio, for your review. I agree that the escaping is OK. Regarding the issue of the extra 'L' at the end, I think I understand what happened: The initial patch was using PyLong_FromUnsignedLongLong to create the line number which, as it name indicates, returns a Python Long, hence the 'L'. but then, probably prompted by review, Phil changed it to use gdb_py_object_from_longest which only uses a long if the value does not fit in an 'int'. But because of the missing escaping, the change in output was never noticed, and so the test never got adjusted. The patch is approved after applying Sergio's comments. Thanks! -- Joel