Test Description
Verify that the AVB filter driver correctly implements IOCTL_AVB_SET_TIMESTAMP and
IOCTL_AVB_GET_TIMESTAMP for direct PHC (PTP Hardware Clock) time read/write operations
on Intel I210, I219, and I226 NICs.
Test Objectives
- Validate that
IOCTL_AVB_SET_TIMESTAMP writes the PHC register (SYSTIML/SYSTIMH) correctly
- Validate that
IOCTL_AVB_GET_TIMESTAMP returns a non-zero, monotonically incrementing value
- Verify readback delta is within expected clock run-on bounds (<100 ms after 10 ms sleep)
- Confirm behaviour across multiple distinct timestamp values
Preconditions
- AVB filter driver installed and loaded
- Intel I210, I219-V, or I226-LM NIC with PTP hardware clock
- Test executable
ptp_clock_control_test.exe built (Debug configuration)
- Driver handle successfully opened (
OPEN_ADAPTER)
- No other process writing PHC concurrently
Test Cases
TC-STIME-001a: Set PHC to non-zero reference value and verify readback
Steps:
- Call
IOCTL_AVB_SET_TIMESTAMP with value 5,000,000,000 ns (5 seconds)
- Sleep 10 ms
- Call
IOCTL_AVB_GET_TIMESTAMP
- Compute
delta = readback − written
Expected Result: 0 ≤ delta < 100,000,000 ns (clock ran on during 10 ms sleep)
TC-STIME-001b: Set PHC to boundary alignment value and verify readback
Steps:
- Call
IOCTL_AVB_SET_TIMESTAMP with value 0x0000000100000000 (~4.3 seconds)
- Sleep 10 ms
- Call
IOCTL_AVB_GET_TIMESTAMP
- Compute
delta = readback − written
Expected Result: 0 ≤ delta < 100,000,000 ns
TC-STIME-001c: Verify IOCTL_AVB_SET_TIMESTAMP IOCTL path
Steps:
- Call
IOCTL_AVB_SET_TIMESTAMP with value 0x5555555555555555 via DeviceIoControl
- Sleep 10 ms
- Call
IOCTL_AVB_GET_TIMESTAMP
- Verify result or note implementation-specific behaviour
Expected Result: Either readback in range OR informational note (implementation-specific for some adapters)
Acceptance Criteria
- ✅
IOCTL_AVB_SET_TIMESTAMP succeeds without error (DeviceIoControl returns TRUE)
- ✅
IOCTL_AVB_GET_TIMESTAMP returns non-zero, monotonically incrementing timestamp
- ✅ Readback delta is within
[0, 100 ms] after 10 ms sleep for all test cases
- ✅ Behaviour consistent across I210, I219-V, I226-LM adapters
Test Type
- Type: Functional, Integration
- Priority: P1 (High — core PTP clock I/O path)
- Automation: Automated —
tests/integration/ptp/ptp_clock_control_test.c, TestTimestampSetting() (Test 1a/1b/1c)
- Status: ✅ Implemented and PASSING (commit
f1fba3c, 2026-04-21, all adapters)
Evidence
- Test function:
TestTimestampSetting() in tests/integration/ptp/ptp_clock_control_test.c
- Commit:
f1fba3c — local run confirms 6/6 subtests PASS on I219-V, I226-LM, I210
Traceability
Test Description
Verify that the AVB filter driver correctly implements
IOCTL_AVB_SET_TIMESTAMPandIOCTL_AVB_GET_TIMESTAMPfor direct PHC (PTP Hardware Clock) time read/write operationson Intel I210, I219, and I226 NICs.
Test Objectives
IOCTL_AVB_SET_TIMESTAMPwrites the PHC register (SYSTIML/SYSTIMH) correctlyIOCTL_AVB_GET_TIMESTAMPreturns a non-zero, monotonically incrementing valuePreconditions
ptp_clock_control_test.exebuilt (Debug configuration)OPEN_ADAPTER)Test Cases
TC-STIME-001a: Set PHC to non-zero reference value and verify readback
Steps:
IOCTL_AVB_SET_TIMESTAMPwith value5,000,000,000 ns(5 seconds)IOCTL_AVB_GET_TIMESTAMPdelta = readback − writtenExpected Result:
0 ≤ delta < 100,000,000 ns(clock ran on during 10 ms sleep)TC-STIME-001b: Set PHC to boundary alignment value and verify readback
Steps:
IOCTL_AVB_SET_TIMESTAMPwith value0x0000000100000000(~4.3 seconds)IOCTL_AVB_GET_TIMESTAMPdelta = readback − writtenExpected Result:
0 ≤ delta < 100,000,000 nsTC-STIME-001c: Verify IOCTL_AVB_SET_TIMESTAMP IOCTL path
Steps:
IOCTL_AVB_SET_TIMESTAMPwith value0x5555555555555555viaDeviceIoControlIOCTL_AVB_GET_TIMESTAMPExpected Result: Either readback in range OR informational note (implementation-specific for some adapters)
Acceptance Criteria
IOCTL_AVB_SET_TIMESTAMPsucceeds without error (DeviceIoControlreturnsTRUE)IOCTL_AVB_GET_TIMESTAMPreturns non-zero, monotonically incrementing timestamp[0, 100 ms]after 10 ms sleep for all test casesTest Type
tests/integration/ptp/ptp_clock_control_test.c,TestTimestampSetting()(Test 1a/1b/1c)f1fba3c, 2026-04-21, all adapters)Evidence
TestTimestampSetting()intests/integration/ptp/ptp_clock_control_test.cf1fba3c— local run confirms 6/6 subtests PASS on I219-V, I226-LM, I210Traceability
tests/integration/ptp/ptp_clock_control_test.c