Skip to content

Commit dc1ae83

Browse files
authored
[libc++][test] Fix a logical mistake introduced by #77058 (#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.
1 parent f02b777 commit dc1ae83

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libcxx/test/support/filesystem_test_helper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ struct scoped_test_env
330330
// Android platform warns about tmpnam, since the problem does not appear
331331
// on Android, let's not apply it for Android.
332332
# if !defined(__ANDROID__)
333-
if (file.size() <= sizeof(address.sun_path)) {
333+
if (file.size() > sizeof(address.sun_path)) {
334334
file = std::tmpnam(nullptr);
335335
}
336336
# endif

0 commit comments

Comments
 (0)