|
From: Sean C. <ch...@su...> - 2001-08-07 20:36:40
|
Everything I run ltp on uses bash 1.x as the default shell. Changing that is not a possibility, which means that I have to update all of these files for 1.x compatability. I speculate it would be more useful to most people if ltp only relied on bash 1.x functionality. My suggestion would be to use `expr $foo + $bar` (with backquotes), rather than the new bash/ksh style expressions. I've been chasing this around with LTP for a week now, so the list of files is helpful; thanks. $.02 -s Nathan Straz wrote: > > This is just a heads up warning to those people running distributions > that don't include bash 2.x yet. > > Many of the scripts in LTP include some Korn shell expressions which > bash 1.x does not understand but bash 2.x does. I've received a few > inquires from people running Red Hat 6.x about scripts failing. Here is > what is going on. > > Differences that affect LTP > =========================== > > * Arithmetic expressions using (( )) > > There are some scripts that feel the need to do some math and they use > this form. For example: > > ltctests/nfs/nfs02/generate.sh > > ... > do > while [ $COUNT -le $LIMIT ] > do > echo -n "AAAAAAAAAA" >> dat/$the_file > (( COUNT = COUNT + 1 )) > done > (( LIMIT = LIMIT * 12 )) > ... > > The bash 1.x way of doing this would be: > ... > do > while [ $COUNT -le $LIMIT ] > do > echo -n "AAAAAAAAAA" >> dat/$the_file > let "COUNT = COUNT + 1" > done > let "LIMIT = LIMIT * 12" > ... > > * tests using [[ ]] > > This is a special test that includes support for pattern matching. Many > Korn shell scripters will use this everywhere. It most cases, you can > use [ ] instead. I'm not sure to make the pattern globbing work well in > bash 1.x. > > Which version of bash are you running? > ====================================== > > So how do you figure out which version of bash you're running? It's > pretty easy and there are many ways to find out. > > # bash --version > # bash -c 'echo $BASH_VERSION' > # rpm -q bash > > Which files are affected? > ========================= > > Here is a rough list of which files in LTP may give bash 1.x users > trouble. > > doio/rwtest.sh > ltctests/ade/ar/ar01 > ltctests/ade/ld/ld01 > ltctests/ade/nm/nm01 > ltctests/fs/fs_inod/fs_inod > ltctests/io/stress_floppy/generate.sh > ltctests/multicast/mc_commo/mc_commo > ltctests/multicast/mc_opts/mc_opts > ltctests/nfs/nfs02/nfs02 > ltctests/nfs/nfs02/generate.sh > ltctests/nfs/nfsstat01/nfsstat01 > ltctests/rpc/rpcinfo/rpcinfo01 > ltctests/tcp_cmds/arp/arp01 > ltctests/tcp_cmds/echo/echo01 > ltctests/tcp_cmds/finger/finger01 > ltctests/tcp_cmds/ftp/generate.sh > ltctests/tcp_cmds/host/host01 > ltctests/tcp_cmds/netstat/netstat01 > ltctests/tcp_cmds/perf_lan/perf_lan > ltctests/tcp_cmds/ping/ping > ltctests/tcp_cmds/ping/ping01 > ltctests/tcp_cmds/rcp/generate.sh > ltctests/tcp_cmds/rcp/rcp01 > ltctests/tcp_cmds/rdist/generate.sh > ltctests/tcp_cmds/rdist/rdist01 > ltctests/tcp_cmds/rsh/rsh01 > ltctests/tcp_cmds/rwho/rwho01 > ltctests/tcp_cmds/sendfile/generate.sh > ltctests/tcp_cmds/sendfile/sendfile01 > ltctests/tcp_cmds/tcpdump/tcpdump01 > > -- > Nate Straz ns...@sg... > sgi, inc http://www.sgi.com/ > Linux Test Project http://ltp.sf.net/ > > _______________________________________________ > Ltp-list mailing list > Ltp...@li... > http://lists.sourceforge.net/lists/listinfo/ltp-list |