Conversation
Simplify DaemonNodeSelector nil check in ptp.go and ptptesthelper.go - len handles nil maps. Assisted-by: Cursor
Replace all pointer.Int64Ptr calls with ptr.To from the already- imported k8s.io/utils/ptr package. Rename the int5/int65 magic constants to defaultPriority/defaultSchedulingPriority. Drop the deprecated k8s.io/utils/pointer import. Assisted-by: Cursor
Extract the pod-label-matching logic that was inline in several ptphelper functions into reusable GetPodWithLabel and findMatchingPod helpers. Refactor GetProfileLogID, GetClockIDMaster, GetClockIDForeign, and WaitForClockIDForeign to use them, reducing duplicated list+filter loops. Assisted-by: Cursor
- Add refreshPodOnNotFound helper to automatically refresh stale pod references after restarts; wire into ExecCommand call sites in checkProcessStatus, checkClockClassState, checkDPLLFrequencyState, checkDPLLPhaseState, and checkClockClassStateReturnBool - GetPTPPodWithPTPConfig returns error instead of (nil, nil) when no matching pod is found - GetPodsRunningPTP4l guards against nil pod - discoverMode sets DiscoveryFailureStatus on pod lookup failure - Guard DiscoveredClockUnderTestPod against nil before use - Improve getMetric error to list available metric lines on miss - Refactor GetProfileName to use switch with nil-guard Assisted-by: Cursor
Add WriteStep and createStepMarker to the log collector to write phase markers into pod log files, making it easier to correlate test steps with daemon output. Wire WriteStep calls into checkProcessStatus and checkClockClassState. Include PTP_TEST_MODE in the serial suite log directory name so runs for different clock types (OC, TBC, TGM, etc.) are separated. Assisted-by: Cursor
Replace the name-prefix heuristic (e.g. ens7f0 -> ens7f*) with PTP hardware clock index from ethtool -T to group interfaces sharing the same NIC. Add getPTPHardwareClockIndex and findIfaceWithPinsForPhc helpers. Refactor GetListOfWPCEnabledInterfaces and addAllInterfacesForNic accordingly. Assisted-by: Cursor
Split toggleNetworkInterface into disableInterface (returning a restore closure) and a thin toggleNetworkInterface wrapper. This makes it possible to disable multiple interfaces and defer their collective restoration. Assisted-by: Cursor
- Add timeout parameter to checkClockClassState for caller-controlled wait duration - Move podsRunningPTP4l retrieval outside By blocks so discovery failures are caught before pod readiness checks - Add HA version check (>= 4.16) to underscore profile name test - Fix indentation in BeforeEach block - Add getL2DiscoveryImage() helper to allow environment override - Initialize MAX_OFFSET_IN_NS/MIN_OFFSET_IN_NS at the top of CreatePtpConfigurations so they're available for config creation - Add verbose PTP announce logging during L2 discovery - Replace hardcoded ptp4lconfBc with dynamic generateBCConfig Assisted-by: Cursor
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the conformance test suite by introducing detailed scenarios for Telco Boundary Clock (T-BC) operation, including its behavior during various holdover states and re-synchronization. It also enhances the test framework's configurability with a new environment variable for E810 plugin settings and improves the robustness of PTP-related helper functions and logging mechanisms. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
|
/gemini review |
Add Telco Boundary Clock (T-BC) test mode with full CI test coverage: - New PTP test mode TelcoBoundaryClock with ptp4l receiver (tbc-tr) and transmitter (tbc-tt) profiles, ts2phc and E810 plugin configuration - PMC monitoring package (test/pkg/pmc) for polling PTP announce data and verifying clock quality passthrough - T-BC holdover test verifying clock class transitions (6 -> 135 -> 165 -> 248) under cable-pull conditions with configurable thresholds - Announce field comparison between receiver and transmitter profiles - DisableSlaveInterfaces helper for multi-interface outage simulation - GetProfileLogID fallback via /var/run config paths - MutateE810PluginSettings for dynamic holdover threshold injection - GetConfigForProfile, GetWPCEnabledInterfaceNames, GetInterfacesByPHCAndPins, GetLeadingInterfaceForSlavePHC helpers - MaxInSpecOffsetNs environment variable support - Updated test README with new environment variables - T-BC specific test mock generators and PTPWPCTBCPolicyName constant Assisted-by: Cursor
6aeac45 to
df837a3
Compare
|
Warning Gemini encountered an error creating the review. You can try again by commenting |
No description provided.