Add unit tests for check_clock_class() function to validate clock class determination when a secondary NIC is locked to an external source while the primary NIC is in holdover state. Test coverage includes: - Clock class 7 when holdover is within threshold - Clock class 140 when holdover exceeds threshold - Clock class 248 when no holdover timestamp exists - Secondary nic locked to an external pin type - Verification that write_ptp4l_gm_fields() is called correctly Adds 3 new test methods: - test_secondary_nic_locked_primary_nic_holdover_within_threshold - test_secondary_nic_locked_primary_nic_holdover_exceeds_threshold - test_secondary_nic_locked_primary_nic_holdover_no_timestamp This validates the code path where a secondary NIC (non-Granite Rapid-D/Connorsville) with external pin type in LOCKED state triggers a check of the primary NIC's GNSS connection status, and the resulting clock class is set based on the primary NIC's holdover duration. For secondary NIC locked with GNSS pin type, instead of external pin type, the following 3 more tests shows clockclass changed to 6, whatever holdover state primary nic be. - test_secondary_nic_locked_with_gnss_primary_nic_holdover_within_threshold - test_secondary_nic_locked_with_gnss_primary_nic_holdover_exceeds_threshold - test_secondary_nic_locked_with_gnss_primary_nic_holdover_no_timestamp Test-only change: New tests are added. TEST PLAN: PASS: unit tests pass Story: 2011536 Task: 53805 Change-Id: Ib848ffc96bf59d92e72e87d9b0d127aed173e443 Signed-off-by: Tara Nath Subedi <tara.subedi@windriver.com>
Description
StarlingX system monitoring and repoting tools
Languages
Python
85.4%
Perl
13.4%
Makefile
1%
Shell
0.1%