On Tue, Jul 07, 2009 at 01:10:36AM +0200, Jiří Paleček wrote: > Hi > > On Mon, 06 Jul 2009 23:51:12 +0200, Matt Helsley <[email protected]> > wrote: > >> On Thu, Jul 02, 2009 at 06:09:16PM -0400, Mike Frysinger wrote: >>> On Thursday 02 July 2009 16:32:53 Matt Helsley wrote: >>> > On Thu, Jul 02, 2009 at 02:35:46PM -0400, Mike Frysinger wrote: >>> > > in general, converting sh to bash is a bad idea as it can cause >>> issues >>> > > for us embedded peeps. >>> > >>> > I suppose that's because of the memory bash consumes. Is there >>> anything >>> > else it does which is bad for embedded? >>> >>> there is memory and disk usage concerns, but there are also systems >>> that cant >>> run bash at all (e.g. systems without fork() -- all no-mmu Linux ports) >>> -mike >> >> Here's that updated patch which hopefully should be able to replace 3 >> and 4 of my recent series. Unfortunately I haven't had a chance to test >> it so >> I'm posting it in case someone else does. As the original author of the >> patch Jiri is welcome to add his signoff as well. > > Thanks for doing this. I have some comments to the patch, see below. > > I have made my "version 2" of the patch too, containing also changes to > other files (like runpwtest.sh). If you're interreseted, I'll send it.
Sure. I'd have happily used that. My main concern is getting these fixed so I can cleanly run the containers testcases. I think it's actually worse than just removing "bashisms" because the interprettern is inconsistent with the scripts and thus nobody can run them. > >> From: Jiri Palecek <[email protected]> >> >> This patch removes a bunch of bashisms. >> >> It was originally written by Jiri Palecek but lacked changes >> requested by Mike Frysinger. >> >> Signed-off-by: Matt Helsley <[email protected]> >> --- >> >> v2: >> Fix pushd/popd removal to save PWD and restore it using a regular >> variable. > > I wonder if this couldn't be done by a simple "cd -", or even left out > completely. Hmm. I didn't think it could be left out completely because of the way $PWD was inconsistently used. Hence some trash could be left if we didn't cd to LTPTMP before and remove it after the test body. > >> Remove empty echoes in favor of printf. > > This hasn't been done thoroughly (some empty echoes remain in the patch). > Also, the patch misses one thing, that if you use printf, you have to add > an extra linefeed at the end, ie: > > echo -e "foo\n" > > has to be replaced by > > printf "foo\n\n" > > for it to work equivalently. Ack, you're right. > >> Remove non-bashism "kill -s KILL ..." and keep "kill -9 ..." >> If this is still a problem then it could be placed in >> a separate patch. >> Keep the exact formatting in cron0X tests -- use printf instead of echo. >> Use non-greedy expansion of tty device in ioctl test. >> Change the increment syntax to use : $(( X += 1 )) instead of: >> X=$((X + 1)) > > I changed this to (IMHO cooler syntax, it's for the sake of aesthetics > after all) ": $((X++))" in my patch. As Mike has noted, dash didn't work with that. Cheers, -Matt ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/blackberry _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
