[libc-commits] [libc] Return errno from OFD failure paths in fcntl. (PR #166252)

Jackson Stogel via libc-commits libc-commits at lists.llvm.org
Mon Nov 3 15:47:49 PST 2025


jtstogel wrote:

> Do we have a test for this?

There's an analogous test that checks `F_GETFL`, not the OFD variant. If you modify that test to specify F_OFD_GETLK, it fails before this patch.

https://github.com/llvm/llvm-project/blob/285b57b1a68e6738dac047f5f6461f231448b0f5/libc/test/src/fcntl/fcntl_test.cpp#L160-L168

It looks like more generally none of the OFD paths are tested. Do we have parameterized testing for libc or an issue to add something like `TEST_P`?

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


More information about the libc-commits mailing list