/* Tests of readlink.
- Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+ Copyright (C) 2009-2014 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
ASSERT (errno == ENOENT);
errno = 0;
ASSERT (func ("", buf, sizeof buf) == -1);
- ASSERT (errno == ENOENT);
+ ASSERT (errno == ENOENT || errno == EINVAL);
errno = 0;
ASSERT (func (".", buf, sizeof buf) == -1);
ASSERT (errno == EINVAL);
ASSERT (errno == EINVAL);
errno = 0;
ASSERT (func (BASE "file/", buf, sizeof buf) == -1);
- ASSERT (errno == ENOTDIR);
+ ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
/* Now test actual symlinks. */
if (symlink (BASE "dir", BASE "link"))
ASSERT (symlink (BASE "file", BASE "link2") == 0);
errno = 0;
ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
- ASSERT (errno == ENOTDIR);
+ ASSERT (errno == ENOTDIR || errno == EINVAL); /* AIX yields EINVAL */
ASSERT (unlink (BASE "file") == 0);
ASSERT (unlink (BASE "link2") == 0);
{