public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Sergio Durigan Junior <sergiodj@redhat.com>
Cc: Simon Marchi <simon.marchi@ericsson.com>,
	gdb-patches@sourceware.org,	Phil Muldoon <pmuldoon@redhat.com>
Subject: Re: [PATCH] Fix test always passing in python/py-linetable.exp
Date: Thu, 27 Nov 2014 08:29:00 -0000	[thread overview]
Message-ID: <20141127082856.GC5042@adacore.com> (raw)
In-Reply-To: <878uixbrfg.fsf@redhat.com>

> 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

  reply	other threads:[~2014-11-27  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 18:35 Simon Marchi
2014-11-26 21:08 ` Sergio Durigan Junior
2014-11-27  8:29   ` Joel Brobecker [this message]
2014-11-27 14:28     ` Simon Marchi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141127082856.GC5042@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=pmuldoon@redhat.com \
    --cc=sergiodj@redhat.com \
    --cc=simon.marchi@ericsson.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).