[libcxx-commits] [libcxx] [libc++][test] Fix a logical mistake introduced by #77058 (PR #77867)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 11 19:25:45 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libcxx
Author: Wu Yingcong (yingcong-wu)
<details>
<summary>Changes</summary>
A logical mistake is made in #<!-- -->77058, we should try to find a new file path for socket creation when the path's length generated is bigger than the socket length limit.
---
Full diff: https://github.com/llvm/llvm-project/pull/77867.diff
1 Files Affected:
- (modified) libcxx/test/support/filesystem_test_helper.h (+1-1)
``````````diff
diff --git a/libcxx/test/support/filesystem_test_helper.h b/libcxx/test/support/filesystem_test_helper.h
index 2ff237a4b6220c..1b3313d0c1cfb0 100644
--- a/libcxx/test/support/filesystem_test_helper.h
+++ b/libcxx/test/support/filesystem_test_helper.h
@@ -330,7 +330,7 @@ struct scoped_test_env
// Android platform warns about tmpnam, since the problem does not appear
// on Android, let's not apply it for Android.
# if !defined(__ANDROID__)
- if (file.size() <= sizeof(address.sun_path)) {
+ if (file.size() > sizeof(address.sun_path)) {
file = std::tmpnam(nullptr);
}
# endif
``````````
</details>
https://github.com/llvm/llvm-project/pull/77867
More information about the libcxx-commits
mailing list