[libc++][AIX] Add AIX error message as expected output

AIX's libc generates "Error -1 occurred" instead of the "Unknown Error"
expected by these test cases. Add this as expected output for AIX only.

Reviewed By: daltenty, #powerpc, #libc, zibi, Quuxplusone

Differential Revision: https://reviews.llvm.org/D119982
This commit is contained in:
Zarko Todorovski 2022-02-22 14:34:10 -05:00
parent cb8e9bea95
commit 7fb02d2752
2 changed files with 8 additions and 2 deletions

View File

@ -8,7 +8,6 @@
// XFAIL: suse-linux-enterprise-server-11
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: LIBCXX-AIX-FIXME
// <system_error>
@ -28,7 +27,11 @@ void test_message_for_bad_value() {
const std::error_category& e_cat1 = std::generic_category();
const std::string msg = e_cat1.message(-1);
// Exact message format varies by platform.
#if defined(_AIX)
LIBCPP_ASSERT(msg.rfind("Error -1 occurred", 0) == 0);
#else
LIBCPP_ASSERT(msg.rfind("Unknown error", 0) == 0);
#endif
assert(errno == E2BIG);
}

View File

@ -14,7 +14,6 @@
// XFAIL: suse-linux-enterprise-server-11
// XFAIL: use_system_cxx_lib && target={{.+}}-apple-macosx10.{{9|10|11|12}}
// XFAIL: LIBCXX-AIX-FIXME
#include <system_error>
#include <cassert>
@ -28,7 +27,11 @@ void test_message_for_bad_value() {
const std::error_category& e_cat1 = std::system_category();
const std::string msg = e_cat1.message(-1);
// Exact message format varies by platform.
#if defined(_AIX)
LIBCPP_ASSERT(msg.rfind("Error -1 occurred", 0) == 0);
#else
LIBCPP_ASSERT(msg.rfind("Unknown error", 0) == 0);
#endif
assert(errno == E2BIG);
}