[libcxx-commits] [libcxx] [libc++] Add a utility for checking the output of commands (PR #65917)

via libcxx-commits libcxx-commits at lists.llvm.org
Wed Sep 13 07:59:35 PDT 2023


EricWF wrote:

> > I'm not OK importing our own version of an LLVM tool that we should just use if we need it. Also, reading the tests you added with the change look like they won't last more than one version before they start failing.
> 
> One challenge with using `FileCheck` is that it depends on the rest of LLVM, so we need to basically build it first. This has been a major blocker for us to do this in the past. Perhaps we could investigate shipping `FileCheck` with LLVM such that we can use the apt-get installed version in the Docker image.

Or if we just want to run this on the bots, we can install it as part of the base setup.

However, I don't know that the tests in this PR are tests that provide value to the project. They're going to fail on almost every platform or different compiler version. They don't really test anything that's our responsibility to test. Any added assurance is outweighed by their brittleness. 

Tests should fail only when the behavior under test changes. 

I've given a lot of thought to adding these sorts of tests before, but the inherent non-portability and limited utility have always kept me from doing it. 

Could you more thoroughly explain the value added by these tests and why they can't be established in other ways?


https://github.com/llvm/llvm-project/pull/65917


More information about the libcxx-commits mailing list