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.
Details
Details
- Reviewers
ldionne daltenty hubert.reinterpretcast zibi • Quuxplusone - Group Reviewers
Restricted Project Restricted Project - Commits
- rG7fb02d2752c0: [libc++][AIX] Add AIX error message as expected output
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM, just copying the longer rational why the message is expected on AIX.
Looks like it's looking for the fallback message text from do_strerror_r. Which is returned if handle_strerror_r_return generates no message, which it would if strerror_r returned error EINVAL.
According to POSIX for strerror_r:
These functions may fail if: [EINVAL] [CX] [Option Start] The value of errnum is neither a valid error number nor zero. [Option End]
That's a may, so I guess libc is ok to return it's own unknown error message string for unknown error codes which it does on AIX.
libcxx/test/std/diagnostics/syserr/syserr.errcat/syserr.errcat.objects/system_category.pass.cpp | ||
---|---|---|
34 | Seems reasonable to me, but please pull the preprocessor directives back to column 0: #if defined(_AIX) LIBCPP_ASSERT(msg.rfind("Error -1 occurred", 0) == 0); #else etc. |
Seems reasonable to me, but please pull the preprocessor directives back to column 0:
etc.