/390: Add runtime check for the highgprs kernel feature.
[platform/upstream/glibc.git] / rt / tst-aio7.c
index b4903c7..39c366f 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for AIO POSIX compliance.
-   Copyright (C) 2001,02 Free Software Foundation, Inc.
+   Copyright (C) 2001,02, 03 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -117,12 +117,13 @@ do_test (void)
 
   /* Test for aio_suspend() suspending even if completed elements in list.  */
   {
-    const int BYTES = 8, ELEMS = 2;
+#define BYTES 8
+    const int ELEMS = 2;
     int i, r, fd;
-    char buff[BYTES];
+    static char buff[BYTES];
     char name[] = "/tmp/aio7.XXXXXX";
     struct timespec timeout;
-    struct aiocb cb0, cb1;
+    static struct aiocb cb0, cb1;
     struct aiocb *list[ELEMS];
 
     fd = mkstemp (name);
@@ -180,6 +181,9 @@ do_test (void)
        puts ("aio_suspend([done,blocked],2,3) suspended thread");
        ++result;
       }
+
+    /* Note that CB1 is still pending, and so cannot be an auto variable.
+       Thus we also test that exiting with an outstanding request works.  */
   }
 
   return result;