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 2021/03/11 16:23:26 UTC

svn commit: r1887498 - in /apr/apr/branches/1.7.x: ./ test/testfile.c

Author: ylavic
Date: Thu Mar 11 16:23:26 2021
New Revision: 1887498

URL: http://svn.apache.org/viewvc?rev=1887498&view=rev
Log:
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

Modified:
    apr/apr/branches/1.7.x/   (props changed)
    apr/apr/branches/1.7.x/test/testfile.c

Propchange: apr/apr/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /apr/apr/trunk:r1883666

Modified: apr/apr/branches/1.7.x/test/testfile.c
URL: http://svn.apache.org/viewvc/apr/apr/branches/1.7.x/test/testfile.c?rev=1887498&r1=1887497&r2=1887498&view=diff
==============================================================================
--- apr/apr/branches/1.7.x/test/testfile.c (original)
+++ apr/apr/branches/1.7.x/test/testfile.c Thu Mar 11 16:23:26 2021
@@ -1251,7 +1251,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)