summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2021-03-11 16:23:26 +0000
committerYann Ylavic <ylavic@apache.org>2021-03-11 16:23:26 +0000
commit8b93fb6e6abd62a5a352979e029175f03616dfe7 (patch)
tree9c1cd799ba0f4e3c26469e27de85b948fff223ab
parent4d201718662d86c00d524fbb4d3d3b420f11ba94 (diff)
downloadapr-8b93fb6e6abd62a5a352979e029175f03616dfe7.tar.gz
Merge r1883666 from trunk:
fdatasync() might return EINVAL for special files (i.e. terminal). This is the case on latest Linux for instance, like 5.9. Submitted by: ylavic git-svn-id: https://svn.apache.org/repos/asf/apr/apr/branches/1.7.x@1887498 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/testfile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/testfile.c b/test/testfile.c
index f90ca92ba..8ed6b5128 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -1251,7 +1251,7 @@ static void test_datasync_on_stream(abts_case *tc, void *data)
rv = apr_file_write_full(f, "abcdef\b\b\b\b\b\b\b", 12, &bytes_written);
APR_ASSERT_SUCCESS(tc, "write to stdout", rv);
rv = apr_file_datasync(f);
- APR_ASSERT_SUCCESS(tc, "sync stdout", rv);
+ ABTS_TRUE(tc, rv == APR_SUCCESS || APR_STATUS_IS_EINVAL(rv));
}
abts_suite *testfile(abts_suite *suite)