Skip to content

Conversation

@frederick-vs-ja
Copy link
Contributor

@frederick-vs-ja frederick-vs-ja commented Mar 2, 2025

Per https://man.freebsd.org/cgi/man.cgi?query=setrlimit, FreeBSD's setrlimit seems to limit the number of processes, not threads via RLIMIT_NPROC. So this test should be XFAIL for FreeBSD.

Pre https://man.freebsd.org/cgi/man.cgi?query=setrlimit, FreeBSD's
`setrlimit` seems to limit the number of processes, not threads via
`RLIMIT_NPROC`. So this test should be XFAIL for FreeBSD.
@frederick-vs-ja frederick-vs-ja added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. test-suite labels Mar 2, 2025
@frederick-vs-ja frederick-vs-ja requested a review from a team as a code owner March 2, 2025 04:06
@llvmbot
Copy link
Member

llvmbot commented Mar 2, 2025

@llvm/pr-subscribers-libcxx

Author: A. Jiang (frederick-vs-ja)

Changes

Pre https://man.freebsd.org/cgi/man.cgi?query=setrlimit, FreeBSD's setrlimit seems to limit the number of processes, not threads via RLIMIT_NPROC. So this test should be XFAIL for FreeBSD.


Full diff: https://github.com/llvm/llvm-project/pull/129413.diff

1 Files Affected:

  • (modified) libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp (+2-1)
diff --git a/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp b/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp
index 0d0c63058d656..d4f7cb771781c 100644
--- a/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp
+++ b/libcxx/test/std/thread/futures/futures.async/thread_create_failure.pass.cpp
@@ -17,9 +17,10 @@
 // There is no way to limit the number of threads on windows
 // UNSUPPORTED: windows
 
-// AIX and macOS seem to limit the number of processes, not threads via RLIMIT_NPROC
+// AIX, FreeBSD, and macOS seem to limit the number of processes, not threads via RLIMIT_NPROC
 // XFAIL: target={{.+}}-aix{{.*}}
 // XFAIL: target={{.+}}-apple-{{.*}}
+// XFAIL: freebsd
 
 // This test makes sure that we fail gracefully in care the thread creation fails. This is only reliably possible on
 // systems that allow limiting the number of threads that can be created. See https://llvm.org/PR125428 for more details

Copy link
Contributor

@philnik777 philnik777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether we should just make this // REQUIRES: target={{.+}}-linux{{.*}}, but this LGTM to get the CI happy again.

@philnik777 philnik777 merged commit fa5db05 into llvm:main Mar 2, 2025
84 checks passed
@frederick-vs-ja frederick-vs-ja deleted the test-freebsd-thread-creation branch March 2, 2025 11:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. test-suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants