Pádraig Brady wrote: > On 01/03/2012 04:29 PM, Jim Meyering wrote: >> FYI, here's a snapshot of what will soon be coreutils-8.15, >> expected on Thursday or Friday. >> >> coreutils snapshot: >> http://meyering.net/cu/coreutils-ss.tar.xz 5.2 MB > > sort-continue was the only failure on: > > $ uname -mi; sw_vers > i386 Macmini4,1 > ProductName: Mac OS X > ProductVersion: 10.6.8 > BuildVersion: 10K549 > $ /bin/sh --version > GNU bash, version 3.2.48(1)-release (x86_64-apple-darwin10.0) > > Error is "sort: open failed: __test.*: No such file or directory" > So globbing is messed up. Note it's only broken with `make -j2` or greater. > The attached work around is to do the glob before the ulimit. ... > Subject: [PATCH] tests: avoid ulimit issue on bash 3.2 on OS X > > * tests/misc/sort-continue: Perform the glob before > the ulimit, as it was seen to make the glob fail > on bash 3.2 on Mac OS X 10.6.8 at least. > --- > tests/misc/sort-continue | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/tests/misc/sort-continue b/tests/misc/sort-continue > index 9fade43..1491dbf 100755 > --- a/tests/misc/sort-continue > +++ b/tests/misc/sort-continue > @@ -27,10 +27,12 @@ for i in $(seq 31); do > echo $i | tee -a in > __test.$i || framework_failure_ > done > > +# glob before ulimit to avoid issues on bash 3.2 on OS X 10.6.8 at least > +test_files=$(echo __test.*) > > ( > ulimit -n 6 > - sort -n -m __test.* 3<&- 4<&- 5<&- < /dev/null > out > + sort -n -m $test_files 3<&- 4<&- 5<&- < /dev/null > out
Nice. Thanks!
