On 8/8/07, Greg Schafer <[EMAIL PROTECTED]> wrote:
> Dan Nicholson wrote:
>
> > A while back we changed the bash test suite to run as the nobody user
> > because it enables more tests to be run. Ken and I have each had a
> > pair of test failures building with 6.3-rc1. Looking closer, the test
> > is checking whether `test -r /dev/stdin' and `test -r /dev/fd/0'
> > return successfully.
>
> Ahh yes. We had a similar discussion back here:
>
> http://www.diy-linux.org/pipermail/diy-linux-dev/2006-August/000841.html

Yep, that was similar. That's what I referred to the other day when I
told Ken that "the last time I thought about this it made my head
hurt" :) Still is making it hurt.

> Sorry for not commenting earlier but I feel your fix is a little heavy
> handed. For something so critical as the shell test suite, ISTM
> redirecting stdin for the *whole test suite* could potentially skew
> results of other tests (not that I'm any expert on file descriptors). I
> think a more conservative approach would be to redirect stdin only for the
> test in question ie: `run-test'. I'll probably go with something like this
> if it tests out correctly:
>
> sed -i.bak '/THIS_SH/s,$, </dev/tty,' tests/run-test

Seems more appropriate. I was trying to avoid another command, but
it's "the right thing to do". I'll try to push that in.

I wanted to ask you about this, though. What's the reason you don't
hit this in DIY? I haven't looked at gsbuild in a while, but do you
redirect </dev/null while building? I do that pretty often in my
scripts to ensure that no garbage inadvertently comes in from stdin.
Just curious.

--
Dan
-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to