[libcxx-commits] [libcxx] [libc++][test] Fix a logical mistake introduced by #77058 (PR #77867)
Wu Yingcong via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jan 11 19:25:18 PST 2024
https://github.com/yingcong-wu created https://github.com/llvm/llvm-project/pull/77867
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.
>From 1ae51db37ed9f5f6da96ae7c5cec86151ec3b01e Mon Sep 17 00:00:00 2001
From: Wu Yingcong <yingcong.wu at intel.com>
Date: Fri, 12 Jan 2024 11:21:31 +0800
Subject: [PATCH] Fix a logical mistake
---
libcxx/test/support/filesystem_test_helper.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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
More information about the libcxx-commits
mailing list