Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-14 Thread Jim Meyering
Stefano Lattarini wrote: > On Tuesday 14 June 2011, Jim Meyering wrote: >> Here's what I expect to do for coreutils, >> along with an advice-update for gnulib's init.sh: >> > Thanks, I'll apply something similar to automake `tests/defs' soonish. > I have a doubt below, tough (see near the end). >

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-14 Thread Stefano Lattarini
On Tuesday 14 June 2011, Jim Meyering wrote: > Here's what I expect to do for coreutils, > along with an advice-update for gnulib's init.sh: > Thanks, I'll apply something similar to automake `tests/defs' soonish. I have a doubt below, tough (see near the end). > From e948173c1c461aac9f1c490061b25

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-14 Thread Jim Meyering
Here's what I expect to do for coreutils, along with an advice-update for gnulib's init.sh: >From e948173c1c461aac9f1c490061b257f55e42608d Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Tue, 14 Jun 2011 09:59:14 +0200 Subject: [PATCH] tests: accommodate HP-UX and Solaris shells Running "make

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-14 Thread Stefano Lattarini
[adding automake-patches on CC:] Reference to original thread(s), mostly duplicated: Reference to last relevant message there:

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-14 Thread Stefano Lattarini
Notice: this is a JFTR answer; for the final solution of the issue, see the better working solution at: On Tuesday 14 June 2011, Eric Blake wrote: > On

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Eric Blake
On 06/13/2011 04:29 PM, Stefano Lattarini wrote: > If this work, then using a bare `>&2' *at the end of TESTS_ENVIRONMENT* and You meant a bare `9>&2', but yes that does seem to be workable for what we want! > *without a following semicolon* might give a portable workaround, as if I'm > not mista

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Eric Blake
On 06/13/2011 04:24 PM, Stefano Lattarini wrote: > On Monday 13 June 2011, Eric Blake wrote: >> >> Not possible to portably sniff out closed fds; quoting the autoconf manual: >> >>> Don't rely on duplicating a closed file descriptor to cause an >>> error. With Solaris @command{/bin/sh}, when the r

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Stefano Lattarini
On Tuesday 14 June 2011, Eric Blake wrote: > On 06/13/2011 03:39 PM, Stefano Lattarini wrote: > > > > [3] The $(SHELL), which here we assume is ksh with close-on-exec, does a > > fork+exec to execute the test script; thus, when that script begins > > its execution, it has the fd 9 close

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Stefano Lattarini
On Monday 13 June 2011, Eric Blake wrote: > > Not possible to portably sniff out closed fds; quoting the autoconf manual: > > > Don't rely on duplicating a closed file descriptor to cause an > > error. With Solaris @command{/bin/sh}, when the redirection fails, the > > output goes to the original

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Eric Blake
On 06/13/2011 03:39 PM, Stefano Lattarini wrote: > > [3] The $(SHELL), which here we assume is ksh with close-on-exec, does a > fork+exec to execute the test script; thus, when that script begins > its execution, it has the fd 9 closed (d'oh!, but expected now); Oddly enough, it looks

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Stefano Lattarini
On Monday 13 June 2011, Stefano Lattarini wrote: > On Monday 13 June 2011, Stefano Lattarini wrote: > > Hi Jim. Probably you're totally going to hate me today, but ... > > > > On Monday 13 June 2011, Jim Meyering wrote: > > > > > > From d987cf87de5e7e597e295914c536bd332c24cc63 Mon Sep 17 00:00:0

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Stefano Lattarini
On Monday 13 June 2011, Eric Blake wrote: > On 06/13/2011 02:32 PM, Stefano Lattarini wrote: > >> +++ b/tests/init.sh > >> @@ -317,6 +317,11 @@ path_prepend_ () > >> > >> setup_ () > >> { > >> + # If we're redirecting a file descriptor larger than 2, say via > >> automake's > >> + # TESTS_ENVI

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Stefano Lattarini
On Monday 13 June 2011, Stefano Lattarini wrote: > Hi Jim. Probably you're totally going to hate me today, but ... > > On Monday 13 June 2011, Jim Meyering wrote: > > > > From d987cf87de5e7e597e295914c536bd332c24cc63 Mon Sep 17 00:00:00 2001 > > From: Jim Meyering > > Date: Mon, 13 Jun 2011 18:

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Eric Blake
On 06/13/2011 02:32 PM, Stefano Lattarini wrote: >> +++ b/tests/init.sh >> @@ -317,6 +317,11 @@ path_prepend_ () >> >> setup_ () >> { >> + # If we're redirecting a file descriptor larger than 2, say via automake's >> + # TESTS_ENVIRONMENT, that redirected FD is closed-on-exec on some systems >>

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Stefano Lattarini
Hi Jim. Probably you're totally going to hate me today, but ... On Monday 13 June 2011, Jim Meyering wrote: > > From d987cf87de5e7e597e295914c536bd332c24cc63 Mon Sep 17 00:00:00 2001 > From: Jim Meyering > Date: Mon, 13 Jun 2011 18:54:53 +0200 > Subject: [PATCH] init.sh: redirect FD 9 to stderr

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Jim Meyering
Eric Blake wrote: > On 06/13/2011 09:37 AM, Jim Meyering wrote: >>> But I think the reason that it invokes a problem is not because of the >>> 1>&$e construct, but because HP-UX opens secondary file descriptors as >>> cloexec or otherwise closing them at some point, so the '/bin/sh k' >>> child pr

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Eric Blake
On 06/13/2011 09:37 AM, Jim Meyering wrote: >> But I think the reason that it invokes a problem is not because of the >> 1>&$e construct, but because HP-UX opens secondary file descriptors as >> cloexec or otherwise closing them at some point, so the '/bin/sh k' >> child process is not inheriting f

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Jim Meyering
Eric Blake wrote: > On 06/13/2011 07:36 AM, Jim Meyering wrote: >> However, it looks like using "eval" didn't help at all. >> What does this do on that system? >> >> sh -c 'e=2; warn_ () { echo "$@" 1>&$e; }; warn_ x' > > $ sh -c 'e=2; warn_ () { echo "$@" 1>&$e; }; warn_ x' > x > >> >> This i

Re: bug#8846: coreutils-8.12 on HP-UX 11.31: 3 of 365 tests failed

2011-06-13 Thread Eric Blake
On 06/13/2011 07:36 AM, Jim Meyering wrote: > However, it looks like using "eval" didn't help at all. > What does this do on that system? > > sh -c 'e=2; warn_ () { echo "$@" 1>&$e; }; warn_ x' $ sh -c 'e=2; warn_ () { echo "$@" 1>&$e; }; warn_ x' x > > This is what happens via tests/check.