Skip to content

Commit 65de315

Browse files
committed
Skip tests if socket name is longer than 107 bytes
To fix the test failures introduced in Commit 488eeb3
1 parent b571aa4 commit 65de315

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lldb/unittests/Host/SocketTest.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,10 @@ TEST_F(SocketTest, DomainSocketFromBoundNativeSocket) {
349349
ASSERT_FALSE(EC);
350350
llvm::sys::path::append(name, "test");
351351

352+
// Skip the test if the $TMPDIR is too long to hold a domain socket.
353+
if (name.size() > 107u)
354+
return;
355+
352356
DomainSocket socket(true);
353357
Status error = socket.Listen(name, /*backlog=*/10);
354358
ASSERT_THAT_ERROR(error.takeError(), llvm::Succeeded());
@@ -370,6 +374,10 @@ TEST_F(SocketTest, AbstractSocketFromBoundNativeSocket) {
370374
true);
371375
llvm::sys::path::append(name, "test");
372376

377+
// Skip the test if the $TMPDIR is too long to hold a domain socket.
378+
if (name.size() > 107u)
379+
return;
380+
373381
AbstractSocket socket;
374382
Status error = socket.Listen(name, /*backlog=*/10);
375383
ASSERT_THAT_ERROR(error.takeError(), llvm::Succeeded());

0 commit comments

Comments
 (0)