/* Tests for AIO in librt.
- Copyright (C) 1998-2016 Free Software Foundation, Inc.
+ Copyright (C) 1998-2023 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
You should have received a copy of the GNU Lesser General Public
License along with the GNU C Library; if not, see
- <http://www.gnu.org/licenses/>. */
+ <https://www.gnu.org/licenses/>. */
#include <aio.h>
#include <errno.h>
/* 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>
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"));
for (cnt = 10; cnt > 0; )
if (aio_cancel (fd, cbp[--cnt]) == -1)
/* This is not an error. The request can simply be finished. */
- printf ("aio_cancel (fd, cbp[%Zd]) cannot be canceled\n", cnt);
+ printf ("aio_cancel (fd, cbp[%zd]) cannot be canceled\n", cnt);
puts ("finished2");
result |= do_wait (cbp, 10, ECANCELED);