[PATCH v4] linux: make getcwd(3) fail if it cannot obtain an absolute path [BZ #22679]
Florian Weimer
fweimer@redhat.com
Thu Jan 11 23:44:00 GMT 2018
On 01/11/2018 11:03 PM, Dmitry V. Levin wrote:
> + char *cwd = getcwd (NULL, 0);
> + TEST_COMPARE (errno, ENOENT);
> + TEST_VERIFY (cwd == NULL);
Maybe also add this?
cwd = realpath (".", NULL);
TEST_VERIFY (cwd == NULL);
TEST_COMPARE (errno, ENOENT);
I assume that we expect to fail realpath with ENOENT as well.
Thanks,
Florian
More information about the Libc-alpha
mailing list