On 10/11/10 17:42, Jim Meyering wrote: > Pádraig Brady wrote: > >> On 10/11/10 17:27, Jim Meyering wrote: >>> That looks fine except that there were some problems >>> (sorry, don't remember details off hand) >>> with tests using that "yes|..." idiom, so I converted >>> them all to use other means. >> >> [snip] >> >>> As far as I'm concerned, using require-perl is fine. >>> Take your pick, or even leave it using yes|head for now. >>> It's no big deal if the test fails on some fringe system. >> >> I'll take the later. >> It would be nice to know what the weird issue was :) > > yes [sic] > > I dug it up: > > http://git.sv.gnu.org/cgit/coreutils.git/commit/?id=cf0fa2d930de1609 > > Use seq, not `yes' to generate link target. > Otherwise, on systems (DJGPP) that emulate pipes using files, > this test would never complete, waiting for `yes' to terminate. > > diff --git a/tests/du/slink b/tests/du/slink > - name=`yes|tr '\n' y|head -c$len` > + name=`seq 1 $len|tr -c x y |head -c$len`
Interesting, thanks. > Is DJGPP still relevant? > The last update of http://www.delorie.com/djgpp/ was in 2003. > Now, I'm tempted to leave your seq|head pipe there, > just to see if anyone notices. OK I'll apply as is, and if it's ever an issue, we can test with a variation of: # yes never terminates with the file based # pipe emulation in DJGPP require_pipes_() { timeout 10 yes | head -n1 > /dev/null || skip_test_ "Emulated pipes unsupported" } cheers, Pádraig.