fdatasync() might return EINVAL for special files (i.e. terminal).
This is the case on latest Linux for instance, like 5.9.
@@ -2239,7 +2239,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)
