This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: linuxthreads tst-cancel4.c et al.
- From: Daniel Jacobowitz <drow at false dot org>
- To: "David S. Miller" <davem at davemloft dot net>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 11 Apr 2005 16:24:10 -0400
- Subject: Re: linuxthreads tst-cancel4.c et al.
- References: <20050411131253.2f083fb6.davem@davemloft.net>
On Mon, Apr 11, 2005 at 01:12:53PM -0700, David S. Miller wrote:
>
> While debugging some sparc testsuite failures I noticed this
> issue. The tst-calcel4.c test tries to do a large write to
> a pipe in order to block.
>
> With current 2.6.x kernels, the internal PIPE buffering the kernel
> uses can be enormous, and the writes done by tst-cancel4.c are not
> large enough thus the write() call does not block and the test fails.
> (at least this is true on my sparc64 system which has a page size of 8K,
> which multiplied by include/linux/pipe_fs_i.h:PIPE_BUFFERS is 128K, the
> tst-cancel4.c tries a 100000 byte write which is smaller)
>
> We can keep upping the buffer size, or we can try and use something
> more reliable to generate a write() which blocks. Perhaps an AF_UNIX
> socket, or a non-blocking write to a file which is locked. I don't
> have any really good ideas...
>
> Comments?
I couldn't think of anything - see my earlier posts about
nptl/tst-cancel17.c, which is the same problem. Linus clarified that
there is no reason to expect writes to a pipe to block, so the numbers
are liable to change again the next time he gets inspired.
--
Daniel Jacobowitz
CodeSourcery, LLC