You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2020/11/20 12:38:39 UTC
svn commit: r1883666 - /apr/apr/trunk/test/testfile.c
Author: ylavic
Date: Fri Nov 20 12:38:39 2020
New Revision: 1883666
URL: http://svn.apache.org/viewvc?rev=1883666&view=rev
Log:
fdatasync() might return EINVAL for special files (i.e. terminal).
This is the case on latest Linux for instance, like 5.9.
Modified:
apr/apr/trunk/test/testfile.c
Modified: apr/apr/trunk/test/testfile.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testfile.c?rev=1883666&r1=1883665&r2=1883666&view=diff
==============================================================================
--- apr/apr/trunk/test/testfile.c (original)
+++ apr/apr/trunk/test/testfile.c Fri Nov 20 12:38:39 2020
@@ -2239,7 +2239,7 @@ static void test_datasync_on_stream(abts
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)