Add a has-fork feature flag and only enable debug-mode tests on systems with fork() support.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
These tests turn on debug mode themselves - they don't need to be limited the configurations where the user turns it on.
I don't want the debug tests to be their "own configuration". They should be run in all configurations (except testing the Apple system libc++)
These tests need to be fixed so that they DTRT when the user specifies -debug_level=X (where X is 0/1) as a LIT param as well.
Ok but does that mean that the REQUIRES only belongs on a subset of the tests? Ones with MODULES_DEFINES: _LIBCPP_DEBUG=1 maybe?
I got here (to this change) indirectly. One of our hexagon targets doesn't support waitpid() so we see compilation failures on the tests that include debug_mode_helper.h. When I read this comment regarding system lib I think I misunderstood and assumed that these tests only are necessary for some library configurations.
I can follow-through on this change if you and Eric agree on what it should be. But maybe I will work on a feature test for waitpid (LIBCXX_HAVE_WAITPID?) instead (or in addition) and somehow gate these tests that way.
Changed debug-mode feature to be deactivated when the LIBCXX_TEST_HAVE_FORK option is disabled. This hopefully sidesteps the debate triggered by the previous revision.
Added REQUIRES: debug-mode to libcxx/input.output/filesystems/class.path/path.itr/iterator_db.pass.cpp, this was unintentionally omitted before.
I think this change makes sense and avoids the controversy. But I suppose the 'debug-mode' feature label might be misleading. Maybe it be better if I just changed it to 'has-fork'?
Is this still relevant? We now have a way of disabling all debug mode tests by using --param enable_debug_tests=False. If not, let's drop this to clean up the review queue.
[Github PR transition cleanup]
We also use has-unix-headers now as a proxy to this. Closing since it's inactive and I don't think it is directly relevant anymore.