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

Luis Machado lgustavo@codesourcery.com
Wed May 15 11:03:00 GMT 2013


On 05/15/2013 12:38 PM, Christian Groessler wrote:
> Hi,
>
> I had some testsuite failures in gdb.dwarf2/dw2-dir-file-name.exp,
> because /bin/sh on my system doesn't support brace expansion.
> I'm using Debian, where /bin/sh is in fact dash. I tried /bin/sh on
> Solaris (9), too, and it also doesn't support brace expansion.
>
> This patch changes dw2-dir-file-name.exp to use bash instead of sh.
>
> Ok to commit?
>
> regards,
> chris
>
>
>
> gdb/testsuite:
> 2013-05-15  Christian Groessler <chris@groessler.org>
>
>         * gdb.dwarf2/dw2-dir-file-name.exp: Use bash instead of sh, since
>         brace expansion is not available in sh.
>
>
>
> Index: gdb.dwarf2/dw2-dir-file-name.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-dir-file-name.exp,v
> retrieving revision 1.4
> diff -u -p -r1.4 dw2-dir-file-name.exp
> --- gdb.dwarf2/dw2-dir-file-name.exp    15 Mar 2013 01:41:28 -0000      1.4
> +++ gdb.dwarf2/dw2-dir-file-name.exp    15 May 2013 10:27:20 -0000
> @@ -322,10 +322,10 @@ if { [gdb_compile "${asmsrcfile} ${srcdi
>       return -1
>   }
>
> -remote_exec host "sh -c \"rm -f
> ${srcabsdir}{/rdir,}{/xdir,}{/compdir,}{/ldir,}{/fdir,}/${srctmpfile}\""
> -remote_exec host "sh -c \"rmdir
> ${srcabsdir}{/rdir,}{/xdir,}{/compdir,}{/ldir,}{/fdir,}\""
> -remote_exec host "sh -c \"mkdir
> ${srcabsdir}{,/rdir}{,/xdir}{,/compdir}{,/ldir}{,/fdir}\""
> -remote_exec host "sh -c \"for d in
> ${srcabsdir}{,/rdir}{,/xdir}{,/compdir}{,/ldir}{,/fdir};do cp
> ${srcdir}/${subdir}/${srcfile} \\\$d/${srctmpfile}; done\""
> +remote_exec host "bash -c \"rm -f
> ${srcabsdir}{/rdir,}{/xdir,}{/compdir,}{/ldir,}{/fdir,}/${srctmpfile}\""
> +remote_exec host "bash -c \"rmdir
> ${srcabsdir}{/rdir,}{/xdir,}{/compdir,}{/ldir,}{/fdir,}\""
> +remote_exec host "bash -c \"mkdir
> ${srcabsdir}{,/rdir}{,/xdir}{,/compdir}{,/ldir}{,/fdir}\""
> +remote_exec host "bash -c \"for d in
> ${srcabsdir}{,/rdir}{,/xdir}{,/compdir}{,/ldir}{,/fdir};do cp
> ${srcdir}/${subdir}/${srcfile} \\\$d/${srctmpfile}; done\""
>
>   clean_restart ${testfile}
>
>
>
>

Speaking of which, i see quite a few failures with this testcase, in the 
form of:

FAIL: gdb.dwarf2/dw2-dir-file-name.exp: 
compdir_missing__ldir_missing__file_basename: continue to breakpoint: 
compdir_missing__ldir_missing__file_basename
PASS: gdb.dwarf2/dw2-dir-file-name.exp: 
compdir_missing__ldir_missing__file_basename: set filename-display absolute
FAIL: gdb.dwarf2/dw2-dir-file-name.exp: 
compdir_missing__ldir_missing__file_basename: absolute
PASS: gdb.dwarf2/dw2-dir-file-name.exp: 
compdir_missing__ldir_missing__file_basename: set filename-display basename
FAIL: gdb.dwarf2/dw2-dir-file-name.exp: 
compdir_missing__ldir_missing__file_basename: basename

Not sure if it is related.



More information about the Gdb mailing list