Skip to content

ci: run cpworker unit and integration tests; pin libzmq to v4.3.3 - #307

Merged
timmy21 merged 1 commit into
0.9.xfrom
fix/300-301-ci
Oct 8, 2026
Merged

timmy21 merged 1 commit into
0.9.xfrom
fix/300-301-ci

Conversation

@timmy21

@timmy21 timmy21 commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Problem

  • CI built the cpworker ctest binaries but never ran them, and never ran the integration suite (cpworker/tests/integration). C data-plane changes had no regression coverage in CI.
  • cptools/cripid has tests but was not in the Go test loop.
  • CI cloned libzmq from master, while cpworker/docs/install_zmq.md pins v4.3.3. CI tested a different libzmq than the documented one, and was not reproducible.

Change

  • New step cpworker unit tests: ctest --output-on-failure in build/tmp/cpworker-linux-amd64.
  • New step cpworker integration tests: ./run_test.sh all. It points CPWORKER_BIN at the Mage build and runs go test under sudo (packet capture needs CAP_NET_RAW). The module is not added to the plain go test loop, which has neither.
  • cptools/cripid added to the Go test loop. cptools/dockerpid has no tests.
  • libzmq: clone tag v4.3.3 and check its commit (04f5bbed).
    • v4.3.3 does not compile with GCC 13 (ubuntu-latest): CURVE's secure_allocator_t trips a libstdc++ allocator assertion. cpworker does not use CURVE, so --disable-curve.
    • Its bundled tests fail -Werror=address under GCC 13, so only src/libzmq.la is built.
  • libzmq3-dev installed for the integration tests' zmq_receiver helper (cgo, pebbe/zmq4, links libzmq.so.5). cpworker still links the pinned libzmq.a: find_library uses NO_DEFAULT_PATH, and ${LIBRARY_ROOT}/include comes first.

Verification

Ran the CI steps in an Ubuntu 24.04 VM (GCC 13.3, system libpcap 1.10.4) with a clean environment:

  • libzmq v4.3.3 with the flags above: builds.
  • Mage build:linux: OK.
  • ctest: 9/9 passed.
  • run_test.sh all: passed (141 s). Without libzmq.so.5 available, TestIdleZMQFlush and TestIntegration/zmq_* fail because zmq_receiver cannot start, hence libzmq3-dev.
  • Go test loop including cptools/cripid (go 1.26 via GOTOOLCHAIN=auto): all OK.

Fixes #300
Fixes #301

CI built the cpworker ctest binaries but never ran them, and never ran
the integration suite. Add a ctest step and a run_test.sh step, and add
cptools/cripid to the Go test loop.

libzmq was cloned from master while install_zmq.md pins v4.3.3. Clone
the v4.3.3 tag and check its commit. v4.3.3 does not build with GCC 13,
so disable CURVE (unused by cpworker) and build only the library.

Install libzmq3-dev for the integration tests' zmq_receiver helper.
cpworker still links the pinned static libzmq.a.
@timmy21
timmy21 merged commit f60c09a into 0.9.x Oct 8, 2026
1 check passed
@timmy21
timmy21 deleted the fix/300-301-ci branch October 8, 2026 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant