diff options
author | Bruno Haible <bruno@clisp.org> | 2019-01-27 11:39:56 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2019-01-27 11:39:56 +0100 |
commit | 675d6027ed01a4dc971d8fe8cdd8fee9eae209b7 (patch) | |
tree | 5d87dd59ed210ca7441d2f8208e44fafbd145f7d /tests | |
parent | fa3e028aab95578dacf9bf42733c123865b82654 (diff) | |
download | gnulib-675d6027ed01a4dc971d8fe8cdd8fee9eae209b7.tar.gz |
tests: Enable Linux specific tests on Android.
* tests/test-flock.c (main): Treat Android like Linux.
* tests/test-openat-safer.c (main): Likewise.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-flock.c | 2 | ||||
-rw-r--r-- | tests/test-openat-safer.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-flock.c b/tests/test-flock.c index ff688bc416..aa428ff717 100644 --- a/tests/test-flock.c +++ b/tests/test-flock.c @@ -98,7 +98,7 @@ main (int argc, char *argv[]) ASSERT (fd >= 0); ASSERT (write (fd, "hello", 5) == 5); -#if defined __linux__ +#if defined __linux__ || defined __ANDROID__ /* Invalid operation codes are rejected by the Linux implementation and by the gnulib replacement, but not by the Mac OS X implementation. */ ASSERT (flock (fd, LOCK_SH | LOCK_EX) == -1); diff --git a/tests/test-openat-safer.c b/tests/test-openat-safer.c index 042e488196..7971168f50 100644 --- a/tests/test-openat-safer.c +++ b/tests/test-openat-safer.c @@ -96,7 +96,7 @@ main (void) errno = 0; ASSERT (openat (dfd, witness "/", O_RDONLY) == -1); ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL); -#ifdef __linux__ +#if defined __linux__ || defined __ANDROID__ /* Using a bad directory is okay for absolute paths. */ fd = openat (-1, "/dev/null", O_WRONLY); ASSERT (STDERR_FILENO < fd); |