summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorYann Ylavic <ylavic@apache.org>2022-06-22 23:39:33 +0000
committerYann Ylavic <ylavic@apache.org>2022-06-22 23:39:33 +0000
commitca6e194f093a26d5a4978be0bc9672dec5865cd0 (patch)
tree4859ede885fd5dce4ff9004f77649f1ec9257f31 /test
parent3c37b97fcf84275b85a340496f03c5a691b5f62b (diff)
downloadapr-ca6e194f093a26d5a4978be0bc9672dec5865cd0.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
Diffstat (limited to 'test')
-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)