Skip to content

ci: add virtual CLOCK_REALTIME shim and DKMS unit tests - #7

Merged
edcdavid merged 2 commits into
mainfrom
ci-realtime-clock
Aug 10, 2026
Merged

ci: add virtual CLOCK_REALTIME shim and DKMS unit tests#7
edcdavid merged 2 commits into
mainfrom
ci-realtime-clock

Conversation

@edcdavid

@edcdavid edcdavid commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add a CI-only virtual CLOCK_REALTIME (VRT) LD_PRELOAD shim (shim/) so Kind workers can run phc2sys -a -r against a per-node stand-in mock PHC instead of the shared host clock.
  • Add scripts/create-vrt-clocks.sh to create those PHCs on Kind workers and document the setup in README.md / ARCHITECTURE.md / shim/README.md.
  • Add root DKMS unit-test scripts and Makefile targets for DPLL, mock PHC, and GNSS/UBX (test-dpll, test-phc, test-gnss-ubx, test-all), plus dkms-install / dkms-uninstall shortcuts.

Related

Test plan

  • make dkms-install on a supported kernel
  • make test-all (or individual test-dpll / test-phc / test-gnss-ubx)
  • shim/test-shim-smoke.sh with loaded netdevsim-dkms
  • With Kind topology: scripts/create-vrt-clocks.sh writes /var/run/ptp/vrt/device per worker

Introduce an LD_PRELOAD shim and wrapper that redirect phc2sys
CLOCK_REALTIME operations to per-node stand-in mock PHCs, plus
scripts/create-vrt-clocks.sh to create those PHCs on Kind workers.
Update ARCHITECTURE.md and README.md with the CI-only VRT setup.
…SS/UBX

Introduce scripts/test-dpll.sh, scripts/test-phc.sh, and scripts/test-gnss-ubx.sh
with embedded Python helpers to exercise the netdevsim DPLL, mock PHC, and
GNSS/UBX emulation via sysfs, generic netlink, and device ioctls. Add Makefile
targets (test-dpll, test-phc, test-gnss-ubx, test-all, dkms-install,
dkms-uninstall) and update README.md and ARCHITECTURE.md with DKMS install
shortcuts and unit-test instructions. Also make the clean target remove build
artifacts across ptp/dpll/netdevsim without invoking the kernel build system.
@edcdavid
edcdavid merged commit 3b89a18 into main Aug 10, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant