From ca6e194f093a26d5a4978be0bc9672dec5865cd0 Mon Sep 17 00:00:00 2001 From: Yann Ylavic Date: Wed, 22 Jun 2022 23:39:33 +0000 Subject: 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 --- test/testfile.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test') 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) -- cgit v1.2.1