Build: qualify Alpine/musl test suite (refs #38)

This commit is contained in:
faumaray committed 2026-12-03 17:51:20 +03:00
1 parent 7d25251e21
commit f8c62c9851
2 files changed
+15 -13

No files matched your search

+10 -10
View File
@@ -81,17 +81,17 @@ per-module platform code selects the native implementation.
| Dependencies | `boost-dev` 1.84.0, `openssl-dev` 3.5.10, `sqlite-dev` 3.53.4, `lua5.4-dev` 5.4.8, `linux-headers` from apk | | Dependencies | `boost-dev` 1.84.0, `openssl-dev` 3.5.10, `sqlite-dev` 3.53.4, `lua5.4-dev` 5.4.8, `linux-headers` from apk |
| Language | C++26, reflection `no` (GCC 15), `<expected>` `yes` | | Language | C++26, reflection `no` (GCC 15), `<expected>` `yes` |
| Modules | `Async Binary Containers Core Crypto Data Functional FunctionalCoreFormatting IO IPC LogState Math Memory Net ObservabilityHooks Resilience Sqlite System SystemAsync Text Time` | | Modules | `Async Binary Containers Core Crypto Data Functional FunctionalCoreFormatting IO IPC LogState Math Memory Net ObservabilityHooks Resilience Sqlite System SystemAsync Text Time` |
| Observed | RelWithDebInfo with `-DVOID_WARNINGS_AS_ERRORS=ON` and `-DVOID_ENABLE_TESTING=OFF`: configure detected `linux-musl`, build passed, `cmake --install` to a prefix succeeded, and the isolated `TargetProfile` consumer configured, linked, and ran (`VoidTargetProfileConsumer` 1/1) recording `target=linux-musl triple=x86_64-alpine-linux-musl compiler=GNU-15.2.0 linkage=shared reflection=no` | | Observed | RelWithDebInfo with `-DVOID_WARNINGS_AS_ERRORS=ON` and `-DVOID_ENABLE_TESTING=OFF`: configure detected `linux-musl`, build passed, `cmake --install` to a prefix succeeded, and the isolated `TargetProfile` consumer configured, linked, and ran (`VoidTargetProfileConsumer` 1/1) recording `target=linux-musl triple=x86_64-alpine-linux-musl compiler=GNU-15.2.0 linkage=shared reflection=no`. Test suite with `-DVOID_ENABLE_TESTING=ON`: 1226 tests, 1221 passed, 5 skipped, 0 failed |
The test suite is **not qualified** on musl yet: with The test suite is qualified too: with `VOID_ENABLE_TESTING=ON` (modules
`VOID_ENABLE_TESTING=ON`, reflection-dependent tests `Async Binary Containers Core Crypto Data Functional FunctionalCoreFormatting
(`tests/standalone/Core/FlagsReflect.cpp`, `Core/Meta.cpp`) failed to compile IO IPC LogState Math Memory Net ObservabilityHooks Resilience Sqlite System
when `VOID_HAS_CXX26_REFLECTION` is false. Those files (and the other SystemAsync Testing Text Time`) the Alpine 3.23 container build ran
reflection-only tests) now declare `// @requires-reflection` and are skipped **1226 tests: 1221 passed, 5 skipped, 0 failed**. Reflection-only tests are
by the test scanner when the capability is absent, so the suite can build; skipped through `// @requires-reflection`. The run also exposed a test bug in
a full musl test run has not been repeated in this environment. `Net/HttpDuplex.cpp` (`recv_until` consumed body bytes past the header
Library configure/build/install/consume is qualified; runtime behaviour marker); the helper now reads byte-wise and the duplex tests pass on musl and
still needs test coverage on this profile. glibc.
Detection uses `CMAKE_C_COMPILER -dumpmachine` (or Detection uses `CMAKE_C_COMPILER -dumpmachine` (or
`CMAKE_C_LIBRARY_ARCHITECTURE`/`CMAKE_C_FLAGS`) matching `musl`. The profile is `CMAKE_C_LIBRARY_ARCHITECTURE`/`CMAKE_C_FLAGS`) matching `musl`. The profile is
+5 -3
View File
@@ -87,14 +87,16 @@ namespace
std::string recv_until(int fd, std::string_view marker) std::string recv_until(int fd, std::string_view marker)
{ {
// Read one byte at a time: the caller reads the body right after the
// header, so consuming bytes past the marker would lose body data.
std::string out; std::string out;
std::array<char, 1024> buf{}; char c = 0;
while (out.find(marker) == std::string::npos) { while (out.find(marker) == std::string::npos) {
const ssize_t n = ::recv(fd, buf.data(), buf.size(), 0); const ssize_t n = ::recv(fd, &c, 1, 0);
if (n <= 0) { if (n <= 0) {
break; break;
} }
out.append(buf.data(), static_cast<std::size_t>(n)); out.push_back(c);
if (out.size() > 64 * 1024) { if (out.size() > 64 * 1024) {
break; break;
} }