summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2022-06-22 23:39:33 +0000
committerylavic <ylavic@13f79535-47bb-0310-9956-ffa450edef68>2022-06-22 23:39:33 +0000
commit00ddc828226523d4e507c419a3f436cbb5ea3af3 (patch)
tree4859ede885fd5dce4ff9004f77649f1ec9257f31
parentb87220f784df971f9f50d9bd93edadb6f1d25751 (diff)
downloadlibapr-00ddc828226523d4e507c419a3f436cbb5ea3af3.tar.gz
testfile: try to determine how apr_file_datasync() fails for streams on macos.
* test/testfile.c(test_datasync_on_stream): Let ABTS_INT_EQUAL show the actual errno. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1902175 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--test/testfile.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/testfile.c b/test/testfile.c
index 9a1f86b8c..f48e38857 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -2239,7 +2239,9 @@ 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);
- ABTS_TRUE(tc, rv == APR_SUCCESS || APR_STATUS_IS_EINVAL(rv));
+ if (rv != APR_SUCCESS) {
+ ABTS_INT_EQUAL(tc, APR_EINVAL, rv);
+ }
}
abts_suite *testfile(abts_suite *suite)