From 8a50afe86f864db13b701b36138f768271e0f208 Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Tue, 1 Sep 2026 09:08:56 -0700 Subject: [PATCH 1/2] Update test expectation due to #872 --- delta/test/test_files/delta.test | 4 +++- iceberg/test/test_files/iceberg.test | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/delta/test/test_files/delta.test b/delta/test/test_files/delta.test index ac417984..4002a824 100644 --- a/delta/test/test_files/delta.test +++ b/delta/test/test_files/delta.test @@ -40,10 +40,12 @@ Alice|[52,24,31]|True|2020-05-17 00:00:00|{age: 25, gender: female} Bob|[15,66,72]|False|2011-03-22 00:00:00|{age: 22, gender: male} Carol|[29,24,11]||2001-04-15 00:00:00|{age: 33, gender: female} +# Core binder passes the source through verbatim for extension-provided formats, so the +# error for a non-existent table path now comes from the Delta scan itself. -LOG InvalidDeltaPath -STATEMENT LOAD FROM '${LBUG_ROOT_DIRECTORY}/student'(file_format='delta') RETURN * ---- error -Binder exception: No file found that matches the pattern: ${LBUG_ROOT_DIRECTORY}/student. +IO Error: Hit DeltaKernel FFI error (from: While trying to read from delta table: '${LBUG_ROOT_DIRECTORY}/student'): Hit error: 2 (Generic) with message (Not a Delta table: {}) -LOG InvalidDeltaTable -STATEMENT LOAD FROM '${LBUG_ROOT_DIRECTORY}/src' (file_format='delta') RETURN * diff --git a/iceberg/test/test_files/iceberg.test b/iceberg/test/test_files/iceberg.test index a0ed3279..f68be972 100644 --- a/iceberg/test/test_files/iceberg.test +++ b/iceberg/test/test_files/iceberg.test @@ -50,10 +50,12 @@ Yale|6|190.700000 #Bob|[15,66,72]|False|2011-03-22 00:00:00|{age: 22, gender: male} #Carol|[29,24,11]||2001-04-15 00:00:00|{age: 33, gender: female} +# Core binder passes the source through verbatim for extension-provided formats, so the +# error for a non-existent table path now comes from the Iceberg scan itself. -LOG InvalidIcebergPath -STATEMENT LOAD FROM '${LBUG_ROOT_DIRECTORY}/student' (file_format='iceberg', allow_moved_paths=true) RETURN * ----- error -Binder exception: No file found that matches the pattern: ${LBUG_ROOT_DIRECTORY}/student. +---- error(regex) +IO Error: Cannot open file ".*": (The system cannot find the path specified.*|No such file or directory) -LOG InvalidIcebergTable -STATEMENT LOAD FROM '${LBUG_ROOT_DIRECTORY}/src' (file_format='iceberg', allow_moved_paths=true) RETURN * From f33f6f69fa929198e7208dfac38e9bdbf9143dc7 Mon Sep 17 00:00:00 2001 From: Arun Sharma Date: Tue, 1 Sep 2026 09:48:37 -0700 Subject: [PATCH 2/2] fix(httpfs): disable SO_REUSEPORT in the test http server RepeatOpenDoesNotIssueSecondHead failed flakily in the ladybug repo CI (headCount()==0) under `ctest -j10`. The vendored httplib enables SO_REUSEPORT by default on Linux, which lets multiple sockets bind the same port and load-balances connections between them. ctest runs each gtest case in its own process, so two concurrent test processes both successfully bound 127.0.0.1:18123 and the kernel routed some requests to the other process's server - the HEAD-count assertion then observed requests that never reached the server it was checking (reproduced locally: two concurrent processes both bound 18123, and the failing process saw headCount 0 or 2). Override the server socket options to set only SO_REUSEADDR so a second bind of the same port fails with EADDRINUSE and the existing port scan falls through to a genuinely free port. 20 consecutive `ctest -j10` runs pass with this change; without it ~25% of runs failed. --- httpfs/test/httpfs_test.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/httpfs/test/httpfs_test.cpp b/httpfs/test/httpfs_test.cpp index 44f9aa2f..d59fdff9 100644 --- a/httpfs/test/httpfs_test.cpp +++ b/httpfs/test/httpfs_test.cpp @@ -39,6 +39,18 @@ class LocalHttpServer { } return httplib::Server::HandlerResponse::Unhandled; }); + // The vendored httplib enables SO_REUSEPORT by default on Linux, which + // allows multiple sockets to bind the same port and load-balances + // connections between them. When ctest runs these tests in parallel, + // two processes' servers then share a port and requests land on the + // wrong server, making request counts flaky (observed as headCount()==0 + // under `ctest -j10`). Restrict to SO_REUSEADDR so a second bind fails + // and the loop below picks a genuinely free port instead. + server_.set_socket_options([](socket_t sock) { + int yes = 1; + setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast(&yes), + sizeof(yes)); + }); for (int port = 18123; port < 18153; ++port) { if (server_.bind_to_port("127.0.0.1", port)) { port_ = port;