This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Reimplement the dynamic filesystem helper without using Python
ClosedPublic

Authored by ldionne on Mar 31 2020, 6:35 AM.

Details

Summary

This patch reimplements the dynamic filesystem helper using Posix
functionality instead of relying on Python. The primary reason for
doing this is that it allows running the libc++ test suite on devices
that do not have Python.

Diff Detail

Event Timeline

ldionne created this revision.Mar 31 2020, 6:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 31 2020, 6:35 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
ldionne accepted this revision as: Restricted Project.Apr 2 2020, 7:27 AM

Got offline approval from Eric to land this, with the intent of doing a post-commit review.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 2 2020, 8:06 AM
This revision was automatically updated to reflect the committed changes.

Thank you very much for working in this @ldionne ! We (the CHERI project, https://github.com/CTSRD-CHERI/llvm-project/) can only sensibly test libc++ using the SSH executor since we use FPGA and QEMU implementations of CHERI MIPS/RISCV.
So far I completely skipped the filesystem tests since our minimal test images don't contain python and I'm looking forward to being able to also run those tests.

I am currently in the process of merging from upstream LLVM and I will attempt to upstream my libc++ lit changes once I've completed that.
I've made a few changes to libc++'s lit remote SSH execution (e.g. adding a new SSHExecutor running with a NFS/SMBFS mounted directory to avoid the scp overhead) that might also be useful upstream.

Thank you very much for working in this @ldionne ! We (the CHERI project, https://github.com/CTSRD-CHERI/llvm-project/) can only sensibly test libc++ using the SSH executor since we use FPGA and QEMU implementations of CHERI MIPS/RISCV.
So far I completely skipped the filesystem tests since our minimal test images don't contain python and I'm looking forward to being able to also run those tests.

My pleasure! I'm glad this is useful to others too. We're not always aware of all the different ways the test suite is used, but I keep being impressed.

I am currently in the process of merging from upstream LLVM and I will attempt to upstream my libc++ lit changes once I've completed that.
I've made a few changes to libc++'s lit remote SSH execution (e.g. adding a new SSHExecutor running with a NFS/SMBFS mounted directory to avoid the scp overhead) that might also be useful upstream.

Interesting -- please note that significant changes are coming to how we configure the libc++ test suite. Specifically, I want to decouple it from the CMake configuration so that we can start checking-in Lit configurations in the repository. It might appear a bit hand-wavy right now, however it should become clearer soon. Feel free to reach out to me on the Cpplang Slack at @ldionne if you want to chat about it.

libcxx/test/CMakeLists.txt