[patch]: testsuite: run bash instead of sh when using brace expansion

Christian Groessler chris@groessler.org
Fri May 17 07:45:00 GMT 2013


On 05/16/13 01:24, Sergio Durigan Junior wrote:
> Next time, please make sure to send patches to 
> gdb-patches@sourceware.org. Also I don't see you on gdb/MAINTAINERS, 
> do you have copyright assignment for GDB? This patch is simple enough 
> to go in without a copyright assignment, but if you intend to send 
> more patches please let me know (in off) and I can get you started on 
> the process. 


I think I have an assignment for gdb, but I'm not 100 percent sure. I've 
moved recently and don't find my papers at the moment.
Could someone verify please that the assignment is in place?



>>         * gdb.dwarf2/dw2-dir-file-name.exp: Use bash instead of sh, since
>>         brace expansion is not available in sh.
>   ^^^^^^^^
> You're using spaces instead of a TAB here.


That was the result of copy-n-paste into the mail.


> I am not sure what others think, but instead of depending on bash (which
> may not be available on all platforms), I'd rather rewrite those
> commands to avoid brace expansions at all, thus making them compatible
> with sh.  I am not a maintainer however, so you'd better wait for one
> until you do that.


How about the following patch? My tcl fu is not that strong, so I 
explicitly wrote out
the expanded strings instead of computing them.

The shell command line could get quite long with this change, depending 
how deep
the build directory is located in the hierarchy. I could invoke the 
shell for each path separately, but
this would be slower. Any opinions?

regards,
chris




2013-05-17  Christian Groessler <chris@groessler.org>

        * gdb.dwarf2/dw2-dir-file-name.exp: Don't use brace expansion,
        since it's not supported in all shells.  Write out the expanded
        names directly.



-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20130517/64c03b20/attachment.ksh>


More information about the Gdb-patches mailing list