[libcxx-commits] [PATCH] D143158: [libcxx][test] Cover RISC-V in string.capacity test

Nikolas Klauser via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Feb 9 12:10:49 PST 2023


philnik added a comment.

In D143158#4116110 <https://reviews.llvm.org/D143158#4116110>, @asb wrote:

> Thanks for the advice so far. One thing I wanted to flag early so as to avoid wasted effort is that the requirement on the linked doc <https://libcxx.llvm.org/AddingNewCIJobs.html#addingnewcijobs> "We may be reluctant to add and support CI jobs that take a long time to finish or that are too flaky." may be challenging for runners that need to use emulation. I haven't checked what proportion of libcxx tests are execution vs compile tests, but check-libcxx on a fast x86_64 host using qemu-user for to emulate a 'native' RISC-V environment is not fast.

Do you have some estimate how long a run takes? Currently the slowest runners take ~45 minutes to complete a job.

It would be an option to just have a minimal configuration running (i.e. set `LIBCXX_ENABLE_RANDOM_DEVICE`, `LIBCXX_ENABLE_LOCALIZATION`, `LIBCXX_ENABLE_UNICODE`, etc. to `Off`). That will probably reduce the runtime quite a bit (but of course also lower coverage).  You can then enable these once there is native hardware available to run the tests (which should be the case soon-ish if I understand your commit message from D143172 <https://reviews.llvm.org/D143172> correctly).

You could also try to use `-O1` or `-O2` when compiling the tests to reduce the amount of code that actually gets executed. This takes 25% or so longer when running on x64, but maybe the extra time spent compiling reduces the time executing enough that it makes sense in an environment with emulation. I think most of our tests could be removed by the compiler, since we only have very few ABI boundaries. Quite a bit of our tests are thing like `assert(std::min(1, 2) == 1);` or `assert(std::string("string") + "whatever" == "stringwhatever");`. (I should look into why the second example doesn't get optimized away)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D143158



More information about the libcxx-commits mailing list