Skip to content
Snippets Groups Projects
Commit 052d1b46 authored by Avi Kivity's avatar Avi Kivity Committed by Pekka Enberg
Browse files

tests: add strerror_r() test

parent d2a06d34
No related branches found
No related tags found
No related merge requests found
......@@ -26,8 +26,9 @@ void report(bool ok, string msg)
int main(int ac, char** av)
{
error_code ec(EPERM, system_category());
report(ec.message().substr(7) != "unknown", "strerror_r() called from a _GNU_SOURCE binary");
error_code ec(EACCES, system_category());
auto ok = ec.message() == "Permission denied";
report(ok, "strerror_r() called from a _GNU_SOURCE binary");
std::cout << "Test complete (" << failures << "/" << tests << " failures)\n";
return failures ? 1 : 0;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment