[libcxx-commits] [libcxx] [libcxx] [test] Add a test parameter for disabling memory intensive tests (PR #68214)

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Thu Oct 5 00:26:38 PDT 2023


mstorsjo wrote:

> I have a slight problem with these kinds of Lit features, because what's considered "large" or "slow" is entirely subjective.

Yes, that's true. In absolute terms, whether something is large might depend on how much memory you have. But if you look at the whole testsuite, where most tests run "reasonably sized" things, and we have one test that uses 5-7 GB of memory, it's pretty clear that there's a distinction there.

> This is also the reason why `long-tests` is not a great Lit parameter, and in fact I've contemplated removing it IDK how many times.
>
> Instead, I think it would be better to have a way to exclude tests that time out after a certain amount of time, or that bypass some system limits like rlimits. WDYT?

At least for the memory intensive test, it's not workable to just try running it and seeing if it works and tolerate failures. Half of the time, this test itself fails due to OOM, but half of the time, another test that is being compiled at the same time gets the OOM error. So we need to proactively stop it from trying to run.

If you mean that the tests (and the compiler itself) would be run within some wrapping that limits it from using more than x GB of memory etc, I guess that could work - but it'd be a fair amount of work - way out of scope for what I could take on right here.

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


More information about the libcxx-commits mailing list