ci: add virtual CLOCK_REALTIME shim and DKMS unit tests - #7
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
CLOCK_REALTIME(VRT) LD_PRELOAD shim (shim/) so Kind workers can runphc2sys -a -ragainst a per-node stand-in mock PHC instead of the shared host clock.scripts/create-vrt-clocks.shto create those PHCs on Kind workers and document the setup inREADME.md/ARCHITECTURE.md/shim/README.md.test-dpll,test-phc,test-gnss-ubx,test-all), plusdkms-install/dkms-uninstallshortcuts.Related
Test plan
make dkms-installon a supported kernelmake test-all(or individualtest-dpll/test-phc/test-gnss-ubx)shim/test-shim-smoke.shwith loaded netdevsim-dkmsscripts/create-vrt-clocks.shwrites/var/run/ptp/vrt/deviceper worker