Build: qualify Alpine/musl test suite (refs #38)
This commit is contained in:
1 parent
7d25251e21
commit
f8c62c9851
2 files changed
+15
-13
No files matched your search
+10
-10
@@ -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 |
|
||||
| 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` |
|
||||
| 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
|
||||
`VOID_ENABLE_TESTING=ON`, reflection-dependent tests
|
||||
(`tests/standalone/Core/FlagsReflect.cpp`, `Core/Meta.cpp`) failed to compile
|
||||
when `VOID_HAS_CXX26_REFLECTION` is false. Those files (and the other
|
||||
reflection-only tests) now declare `// @requires-reflection` and are skipped
|
||||
by the test scanner when the capability is absent, so the suite can build;
|
||||
a full musl test run has not been repeated in this environment.
|
||||
Library configure/build/install/consume is qualified; runtime behaviour
|
||||
still needs test coverage on this profile.
|
||||
The test suite is qualified too: with `VOID_ENABLE_TESTING=ON` (modules
|
||||
`Async Binary Containers Core Crypto Data Functional FunctionalCoreFormatting
|
||||
IO IPC LogState Math Memory Net ObservabilityHooks Resilience Sqlite System
|
||||
SystemAsync Testing Text Time`) the Alpine 3.23 container build ran
|
||||
**1226 tests: 1221 passed, 5 skipped, 0 failed**. Reflection-only tests are
|
||||
skipped through `// @requires-reflection`. The run also exposed a test bug in
|
||||
`Net/HttpDuplex.cpp` (`recv_until` consumed body bytes past the header
|
||||
marker); the helper now reads byte-wise and the duplex tests pass on musl and
|
||||
glibc.
|
||||
|
||||
Detection uses `CMAKE_C_COMPILER -dumpmachine` (or
|
||||
`CMAKE_C_LIBRARY_ARCHITECTURE`/`CMAKE_C_FLAGS`) matching `musl`. The profile is
|
||||
|
||||
@@ -87,14 +87,16 @@ namespace
|
||||
|
||||
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::array<char, 1024> buf{};
|
||||
char c = 0;
|
||||
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) {
|
||||
break;
|
||||
}
|
||||
out.append(buf.data(), static_cast<std::size_t>(n));
|
||||
out.push_back(c);
|
||||
if (out.size() > 64 * 1024) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user