]> git.ipfire.org Git - thirdparty/glibc.git/blobdiff - rt/tst-aio.c
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / rt / tst-aio.c
index 783907ea8066828d8b456da928b453def929c4a5..bbb76df88b59d8dbad6bd14af09bc69d8416c2bc 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests for AIO in librt.
-   Copyright (C) 1998-2015 Free Software Foundation, Inc.
+   Copyright (C) 1998-2019 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -34,9 +34,6 @@ extern int do_test (int argc, char *argv[]);
 /* We have a preparation function.  */
 #define PREPARE do_prepare
 
-/* We might need a bit longer timeout.  */
-#define TIMEOUT 20 /* sec */
-
 /* This defines the `main' function and some more.  */
 #include <test-skeleton.c>
 
@@ -51,15 +48,15 @@ do_prepare (int argc, char *argv[])
   size_t name_len;
 
   name_len = strlen (test_dir);
-  name = malloc (name_len + sizeof ("/aioXXXXXX"));
+  name = xmalloc (name_len + sizeof ("/aioXXXXXX"));
   mempcpy (mempcpy (name, test_dir, name_len),
           "/aioXXXXXX", sizeof ("/aioXXXXXX"));
-  add_temp_file (name);
 
   /* Open our test file.   */
   fd = mkstemp (name);
   if (fd == -1)
     error (EXIT_FAILURE, errno, "cannot open test file `%s'", name);
+  add_temp_file (name);
 }