Skip to content

Updated qos_ecn_config_test.go file, based on README.MD - #5864

Open
vjarial-web wants to merge 1 commit into
openconfig:mainfrom
vjarial-web:qos_ecn_config_test_10_07_2026
Open

vjarial-web wants to merge 1 commit into
openconfig:mainfrom
vjarial-web:qos_ecn_config_test_10_07_2026

Conversation

@vjarial-web

@vjarial-web vjarial-web commented Aug 10, 2026 •

Copy link
Copy Markdown
Contributor

Objective
This test validates the configuration of Explicit Congestion Notification (ECN) via OpenConfig WRED profiles. It ensures the device correctly applies and persists buffer utilization cut-off limits across queues for CE-marking packets, allowing micro-burst absorption without prematurely dropping packets.

Interfaces & Technologies Used

  • APIs: gNMI, gNOI (SwitchControlProcessor)
  • Models: OpenConfig QoS (queue-management-profiles, wred, interfaces/output/queues, classifiers)
  • Features: QoS, ECN, IPv4 DSCP Classification

Topology Note
Requires the 2_router_links testbed (DUT connected to ATE via two direct ports) and a vRX-compatible platform.

Expected Outcome Summary

  • Phase 1 (Validation & Persistence): Iteratively applies ECN profiles to output queues using absolute (KB/MB) and percentage-based thresholds. Verifies that the queue bindings and configurations persist across a gNOI supervisor switchover.
  • Phase 2 (Negative Testing & Teardown): Asserts the device safely rejects malformed configurations (e.g., reversed min/max thresholds, >100% probabilities, assigning bogus profiles, deleting in-use profiles), finishing with a cleanly verified teardown.

Success Metrics

  • Control/Data Plane Accuracy: gNMI state paths must exactly match the pushed OpenConfig WRED schema metrics and queue bindings.
  • Resilience & Stability: The device must survive supervisor failovers without state loss and correctly generate gNMI errors when rejecting invalid configurations.

@vjarial-web
vjarial-web requested a review from a team as a code owner August 10, 2026 08:08
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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 updates the QoS ECN configuration test suite to better reflect the requirements outlined in the project's README. The changes involve a significant refactoring of the test code, moving from a monolithic structure to a modular, test-case-driven approach. This improves maintainability and allows for more granular validation of ECN profile configurations, including negative testing and supervisor switchover resilience.

Highlights

  • Test Refactoring: Refactored the QoS ECN configuration test file to align with the README.md specifications, improving test structure and readability.
  • New Test Cases: Introduced specific test cases for equal thresholds, MB thresholds, percentage thresholds, negative scenarios, and teardown/cleanup procedures.
  • Environment Setup: Added a dedicated setupEnvironment function to handle interface configuration and QoS classifier setup consistently across tests.
  • Resilience Testing: Integrated a supervisor switchover test using gNOI to verify configuration persistence after system events.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize the 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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. 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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩

@google-cla

google-cla Bot commented Aug 10, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@OpenConfigBot

OpenConfigBot commented Aug 10, 2026 •

Copy link
Copy Markdown

Pull Request Functional Test Report for #5864 / 0eafdba

Virtual Devices

Device Test Status Test Documentation Job Raw Log
Arista cEOS status
DP-1.3: failure
DP-1.3: QoS ECN feature config
d20f7fa8 Log
Cisco 8000E status
DP-1.3: failure
DP-1.3: QoS ECN feature config
d910a55d Log
Cisco XRd status
DP-1.3: failure
DP-1.3: QoS ECN feature config
cfb4b996 Log
Juniper ncPTX status
DP-1.3: failure
DP-1.3: QoS ECN feature config
f335e16a Log
Nokia SR Linux status
DP-1.3: failure
DP-1.3: QoS ECN feature config
d8cf1b47 Log
Openconfig Lemming status
DP-1.3: failure
DP-1.3: QoS ECN feature config
97bc15f3 Log

Hardware Devices

Device Test Status Test Documentation Raw Log
Arista status
DP-1.3: pending authorization
DP-1.3: QoS ECN feature config
Cisco status
DP-1.3: pending authorization
DP-1.3: QoS ECN feature config
Juniper status
DP-1.3: pending authorization
DP-1.3: QoS ECN feature config
Nokia status
DP-1.3: pending authorization
DP-1.3: QoS ECN feature config

Help

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the QoS ECN configuration test to use structured subtests, configuration plugins (cfgplugins), and adds a supervisor switchover verification step. Feedback on the changes includes correcting malformed import paths that cause compilation failures, replacing a static sleep after supervisor switchover with a manual polling loop to check device reachability, and utilizing t.Cleanup() for reliable state reversion instead of a sequential teardown subtest.

Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go Outdated
Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go Outdated
Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go Outdated
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from be99001 to dfcc1cb Compare August 10, 2026 10:14
@vjarial-web
vjarial-web requested a review from a team as a code owner August 10, 2026 10:14
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch 2 times, most recently from 8df290f to c353e13 Compare August 17, 2026 10:10
@ksgireesha
ksgireesha requested a review from sezhang2 August 24, 2026 05:45
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from c353e13 to ca7c20b Compare August 24, 2026 10:20
@vjarial-web

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the QoS ECN configuration tests to use the cfgplugins package, structuring them into distinct subtests (DP-1.3.1 to DP-1.3.5) that cover various threshold configurations, negative test cases, and teardown procedures. Feedback on these changes suggests using gnmi.Delete to directly detach the queue management profile from the output queue instead of replacing it with a nil value. Additionally, it is recommended to define Cisco-specific threshold values as package-level constants in cfgplugins to eliminate hardcoded magic numbers and improve maintainability.

Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go Outdated
Comment thread internal/cfgplugins/qos.go Outdated
Comment thread internal/cfgplugins/qos.go Outdated
Comment thread internal/cfgplugins/qos.go Outdated
Comment thread internal/cfgplugins/qos.go Outdated
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from ca7c20b to 626e6c1 Compare September 1, 2026 11:06
Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go Outdated
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from 626e6c1 to 81f1ff2 Compare September 22, 2026 04:35
@vjarial-web

Copy link
Copy Markdown
Contributor Author

/fptest arista-physical

@kapilrajput-g

Copy link
Copy Markdown
Contributor

/fptest virtual

@vjarial-web

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the QoS ECN configuration test to align with DP-1.3 specifications, introducing new test cases for different threshold types, negative scenarios, and supervisor switchover. It also adds corresponding deviations, metadata updates, and helper functions in the configuration plugins. The feedback highlights a critical compile-time error in the test where a string is compared to nil, and several style guide violations: the teardown block should be registered via t.Cleanup() to guarantee execution, the new deviation accessors must include issue tracker URLs, and the signature of NewQoSQueueManagementProfile needs to be refactored to match the standard configuration plugin format.

Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go Outdated
Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go
Comment thread internal/deviations/deviations.go Outdated
Comment thread internal/deviations/deviations.go Outdated
Comment thread internal/deviations/deviations.go Outdated
Comment thread internal/cfgplugins/qos.go Outdated
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from debc782 to be966c3 Compare September 30, 2026 06:33
@vjarial-web

Copy link
Copy Markdown
Contributor Author

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refactors the QoS ECN configuration test to align with the DP-1.3 test specifications, introducing subtests for various threshold configurations, negative test cases, supervisor switchover, and teardown verification. It also adds the ecn_min_greater_max_threshold_unsupported deviation and several helper functions in qoscfg.go and gnoi.go. Feedback highlights that ReplaceQueueManagementProfile in qoscfg.go violates configuration plugin guidelines by executing direct gNMI operations instead of returning a batch. Additionally, a cleanup step in qos_ecn_config_test.go should use qoscfg.QosInterfaceID to correctly handle interface ID deviations.

Comment thread internal/qoscfg/qoscfg.go Outdated
Comment thread feature/qos/tests/qos_ecn_config_test/qos_ecn_config_test.go Outdated
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from 8ba7877 to 9c4634a Compare September 30, 2026 21:57
Comment thread proto/metadata.proto Outdated
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from 9c4634a to 99c8da6 Compare October 13, 2026 22:35
@vjarial-web
vjarial-web force-pushed the qos_ecn_config_test_10_07_2026 branch from 99c8da6 to 0eafdba Compare October 15, 2026 13:16

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants