This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 1/8] Fixup testcases outputting own name as a test name


On 11/25/2016 05:48 PM, Simon Marchi wrote:
> On 2016-11-25 12:37, Luis Machado wrote:
>>> I think all these references to $binfile will put the full file
>>> path on gdb.sum?  I think you want $testfile instead.
>>>
>>> Thanks,
>>> Pedro Alves
>>>
>>
>> They will, which may make it easier to just build the files by hand
>> with the output from the log file. But it has the potential to be a
>> big path.
>>
>> I'm fine with either approach.
> 
> I think it's fine how you did in the patch.  Most of the time, binfile
> is based on testfile, so Pedro's suggestion would work.  But sometimes,
> we pass something else than binfile as the compilation destination (or
> binfile was overrident), so we would have to remember to use something
> else than testfile to build the error message, it seems easy to forget.

Or just not pass anything about the target file?
"failed to compile" works just as well, IMO.  If you need more detail,
it's in the gdb.log.

> I think that consistently using the same expression as is passed to
> gdb_compile's dest parameter is a good approach.  Or maybe the error
> should be handled in gdb_compile instead of in each individual test,
> that would be even less error-prone.
> 
> Of course, that doesn't hold if the issue about having the full paths in
> the test message is about the reproducibility (test names will have
> different names depending on the path where you build gdb).  

Yes, that's what I was thinking.  So that diffing test results
of builds done on different directories doesn't come out with spurious
hunks.

> But since
> it's only for error test names, I don't know if that's a real problem.

IMO, it is.  I'd rather if we aimed at not introducing more instances
of this problem.

Thanks,
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]