Index: test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp =================================================================== --- test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp +++ test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/generic_category.pass.cpp @@ -31,7 +31,9 @@ errno = E2BIG; // something that message will never generate const std::error_category& e_cat1 = std::generic_category(); const std::string msg = e_cat1.message(-1); - LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error"); + // Exact message format varies by platform. + LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error" || + msg == "Unknown error: -1"); assert(errno == E2BIG); } Index: test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp =================================================================== --- test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp +++ test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp @@ -31,7 +31,9 @@ errno = E2BIG; // something that message will never generate const std::error_category& e_cat1 = std::system_category(); const std::string msg = e_cat1.message(-1); - LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error"); + // Exact message format varries by platform. + LIBCPP_ASSERT(msg == "Unknown error -1" || msg == "Unknown error" || + msg == "Unknown error: -1"); assert(errno == E2BIG); }