From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3959 invoked by alias); 15 May 2013 23:25:13 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 3944 invoked by uid 89); 15 May 2013 23:25:12 -0000 X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Wed, 15 May 2013 23:25:12 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4FNORHM007792 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 15 May 2013 19:24:27 -0400 Received: from psique (ovpn-113-83.phx2.redhat.com [10.3.113.83]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4FNONmp003124 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Wed, 15 May 2013 19:24:25 -0400 From: Sergio Durigan Junior To: Christian Groessler Cc: gdb@sourceware.org Subject: Re: [patch]: testsuite: run bash instead of sh when using brace expansion References: <51936596.8010205@groessler.org> X-URL: http://www.redhat.com Date: Wed, 15 May 2013 23:25:00 -0000 In-Reply-To: <51936596.8010205@groessler.org> (Christian Groessler's message of "Wed, 15 May 2013 12:38:14 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2013-05/txt/msg00068.txt.bz2 On Wednesday, May 15 2013, Christian Groessler wrote: > 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. Hey, thanks for the patch. 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. > gdb/testsuite: > 2013-05-15 Christian Groessler Two spaces between name and e-mail. > > * 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. > 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} 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. Thanks, -- Sergio