This is the mail archive of the 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] gdbserver-base.exp: Copy file to standard output directory in ${board}_download

On 04/12/2016 07:36 PM, Simon Marchi wrote:
> On 16-04-12 02:08 PM, Pedro Alves wrote:
>> On 04/12/2016 06:48 PM, Simon Marchi wrote:
>>>  proc ${board}_download { board host dest } {
>>> +    file copy -force $host [standard_output_file $dest]
>>>      return $host
>>>  }
>> I think this should be:
>>    set dest [standard_output_file $dest]
>>    file copy -force $host $dest
>>    return $dest
> Doh, you're right.
>> Don't we need to consider the case of $dest being an absolute path?
> I thought it wouldn't be better not, since we don't even want for tests to
> be able to write outside the standard output directory.  I guess that if a
> test tries to download to /foo/bar, it will end up as
> outputs/gdb.blah/thetest/foo/bar.  Then I would say the test would be at fault.

OK, but I think we should put a comment to the effect in place.  After all,
we'll be pointing other people that run into this in their boards to this 
commit.  :-)

Otherwise LGTM.  (Let's wait a bit to give Yao a chance to comment though.)

Pedro Alves

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