[PATCH] D98278: [test] Add ability to get error messages from CMake for errc substitution

Abhina Sree via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 12:51:03 PDT 2021


abhina.sreeskantharajan accepted this revision.
abhina.sreeskantharajan added a comment.
This revision is now accepted and ready to land.

In D98278#2627032 <https://reviews.llvm.org/D98278#2627032>, @zero9178 wrote:

> In D98278#2626868 <https://reviews.llvm.org/D98278#2626868>, @abhina.sreeskantharajan wrote:
>
>> These changes look good. One more thought I had is that instead of defaulting to python's os.strerror we can emit an error or warning saying that the errc_message is not defined for the project. What do you think?
>
> I like that idea a lot actually! One problem I see however, is that it would probably create noise in every project, even those not using errc substitutions. An initial implementation of mine warned inside of `add_err_msg_substitution`, which is called in basically every project. Ideally it'd warn on the first usage of an errc substitution but that seems rather non-trivial and/or ugly to implement.

Good point, I forgot about that issue. Adding a warning is probably something that should be considered in the future if more projects' tests start to use them. For now, this LGTM from my end, thanks for fixing!


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98278/new/

https://reviews.llvm.org/D98278



More information about the llvm-commits mailing list