summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test-flock.c2
-rw-r--r--tests/test-openat-safer.c2
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);