This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: glibc 2.2 and GCC CVS on alpha
On Thu, Nov 23, 2000 at 10:18:48AM -0800, Kaz Kylheku wrote:
> On Thu, 23 Nov 2000, H . J . Lu wrote:
>
> > > $ cat /usr/src/redhat/BUILD/glibc-build-alpha/rt/tst-aio6.out
> > > aio_suspend() didn't return -1
> > >
> >
> > FYI, as far as I can tell, glibc 2.2 is broken with thread
> > applications. But it is just my opinion and not everyone shares
> > my view. Yes, rt uses thread.
>
> Relax, tst-aio6.c is a brand new program that was added last night! And
> aio_suspend was also worked on at the same time. :)
>
tst-aio6.c doesn't work with
# nohup make check&
since it reads from stdin/tty. Here is a patch which seems to work for
me.
--
H.J. Lu (hjl@valinux.com)
----
2000-11-23 H.J. Lu <hjl@gnu.org>
* rt/tst-aio6.c (do_test): Use pipe instead of STDIN_FILENO to
support the background job.
Fix a typo.
Index: rt/tst-aio6.c
===================================================================
RCS file: /work/cvs/gnu/glibc/rt/tst-aio6.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 tst-aio6.c
--- rt/tst-aio6.c 2000/11/23 17:38:05 1.1.1.1
+++ rt/tst-aio6.c 2000/11/23 22:12:37
@@ -39,10 +39,17 @@ do_test (void)
struct timeval after;
struct timespec timeout;
int result = 0;
+ int fd [2];
+ if (pipe (fd))
+ {
+ perror ("pipe");
+ return 1;
+ }
+
arr[0] = &cb;
- cb.aio_fildes = STDIN_FILENO;
+ cb.aio_fildes = fd [0];
cb.aio_lio_opcode = LIO_WRITE;
cb.aio_reqprio = 0;
cb.aio_buf = (void *) buf;
@@ -52,7 +59,7 @@ do_test (void)
/* Try to read from stdin where nothing will be available. */
if (aio_read (arr[0]) < 0)
{
- printf ("aio_write failed: %m\n");
+ printf ("aio_read failed: %m\n");
return 1;
}