Skip to content

Parallel manager2#1

Open
lolyu wants to merge 18 commits intomasterfrom
parallel_manager2
Open

Parallel manager2#1
lolyu wants to merge 18 commits intomasterfrom
parallel_manager2

Conversation

@lolyu
Copy link
Owner

@lolyu lolyu commented Feb 2, 2026

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

@lolyu lolyu closed this Feb 2, 2026
@lolyu lolyu reopened this Feb 2, 2026
@lolyu
Copy link
Owner Author

lolyu commented Feb 2, 2026

@greptile

@lolyu lolyu closed this Feb 2, 2026
@lolyu lolyu reopened this Feb 2, 2026
@greptile-apps
Copy link

greptile-apps bot commented Feb 2, 2026

Greptile Overview

Greptile Summary

This PR introduces a parallel fixture execution framework to optimize test execution time by parallelizing fixture setup/teardown operations. The implementation includes:

  • Parallel Fixture Manager: A new pytest plugin (parallel_fixture) that uses ThreadPoolExecutor to execute fixture setup/teardown tasks concurrently across different scopes (SESSION, MODULE, CLASS, FUNCTION)
  • Scope-based barriers: Automatic synchronization points that ensure all parallel tasks complete before proceeding to the next test scope
  • Deadlock prevention: Fork-safety mechanisms using os.register_at_fork to prevent logging and Ansible display deadlocks in multi-threaded/multi-process environments
  • Closure bug fixes: Corrected several __getattr__ implementations in base.py, duthosts.py, and multi_asic.py where module names were incorrectly captured by reference instead of by value
  • Docker capability: Added SYS_PTRACE capability to enable thread interruption for timeout handling

The architecture is well-documented and addresses real concurrency challenges in the SONiC test infrastructure. However, there are several logical issues that need attention:

  • Missing return value check in PyThreadState_SetAsyncExc could cause silent failures when interrupting threads
  • Exception re-raising loses original traceback context, making debugging harder
  • The reset() method doesn't clear the terminated flag, potentially preventing the manager from being reused
  • Potential AttributeError when checking handler.lock that could be None

Confidence Score: 3/5

  • This PR has logical issues that could cause runtime failures in edge cases but is generally sound in design
  • The PR implements a complex parallel execution framework with good architecture and documentation. However, several critical logical issues were found: (1) missing return value checks for thread injection API that could silently fail, (2) exception handling that loses traceback context, (3) the reset mechanism doesn't clear the terminated flag which breaks reusability, and (4) potential None reference on handler.lock. These issues should be addressed before merging to ensure reliability in production.
  • tests/common/plugins/parallel_fixture/__init__.py and tests/common/helpers/parallel.py need attention for the logical issues mentioned

Important Files Changed

Filename Overview
tests/common/devices/base.py Fixed closure bug where module_name was captured incorrectly by returning a wrapper function
tests/common/devices/duthosts.py Fixed closure bug and added explicit initialization of _nodes attributes to prevent __getattr__ recursion
tests/common/devices/multi_asic.py Fixed closure bug where multi_asic_attr was captured incorrectly by returning a wrapper function
tests/common/helpers/parallel.py Added deadlock prevention for fork operations with logging locks, patched Ansible worker processes
tests/common/plugins/parallel_fixture/init.py Implemented parallel fixture execution framework with thread pool, scope-based barriers, and exception handling

Sequence Diagram

sequenceDiagram
    participant Pytest
    participant ParallelManager
    participant ThreadPool
    participant MonitorThread
    participant Fixture
    participant Barrier

    Note over Pytest,Barrier: Session Setup Phase
    Pytest->>ParallelManager: Create (session scope)
    ParallelManager->>ThreadPool: Initialize worker threads
    ParallelManager->>MonitorThread: Start monitoring
    
    Pytest->>Fixture: Execute fixture (session scope)
    Fixture->>ParallelManager: submit_setup_task(SESSION, func)
    ParallelManager->>ThreadPool: Submit task to thread pool
    ThreadPool-->>ParallelManager: Return future
    Fixture-->>Pytest: Yield immediately
    
    Pytest->>Barrier: setup_barrier_session
    Barrier->>ParallelManager: wait_for_setup_tasks(SESSION)
    ParallelManager->>ThreadPool: Wait for all session tasks
    ThreadPool-->>ParallelManager: Tasks complete
    
    Note over Pytest,Barrier: Module/Class/Function Scopes
    Pytest->>Fixture: Execute fixture (module scope)
    Fixture->>ParallelManager: submit_setup_task(MODULE, func)
    ParallelManager->>ThreadPool: Submit to pool
    Fixture-->>Pytest: Yield
    
    Pytest->>Barrier: setup_barrier_module
    Barrier->>ParallelManager: wait_for_setup_tasks(MODULE)
    ParallelManager->>ThreadPool: Wait for module tasks
    
    Note over Pytest,Barrier: Test Execution
    Pytest->>ParallelManager: pytest_runtest_call hook
    ParallelManager->>ThreadPool: Ensure all tasks complete
    ParallelManager->>ThreadPool: Terminate executor
    Pytest->>Pytest: Run test function
    
    Note over Pytest,Barrier: Teardown Phase
    Pytest->>ParallelManager: pytest_runtest_teardown hook
    ParallelManager->>ThreadPool: Reset and create new executor
    ParallelManager->>MonitorThread: Restart monitoring
    
    Pytest->>Fixture: Teardown fixture
    Fixture->>ParallelManager: submit_teardown_task(scope, func)
    ParallelManager->>ThreadPool: Submit teardown task
    Fixture-->>Pytest: Return
    
    Pytest->>Barrier: teardown_barrier_function
    Barrier->>ParallelManager: wait_for_teardown_tasks(FUNCTION)
    ParallelManager->>ThreadPool: Wait for function teardowns
    
    Pytest->>ParallelManager: pytest_runtest_logreport hook
    ParallelManager->>ThreadPool: Terminate executor
    ParallelManager->>MonitorThread: Stop monitoring
Loading

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

5 files reviewed, 5 comments

Edit Code Review Agent Settings | Greptile

Comment on lines +38 to +44
def raise_async_exception(tid, exc_type):
"""Injects an exception into the specified thread."""
if not isinstance(tid, int):
raise TypeError("Thread ID must be an integer")

ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid),
ctypes.py_object(exc_type))
Copy link

Choose a reason for hiding this comment

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

The PyThreadState_SetAsyncExc call doesn't check the return value. According to Python docs, it returns the number of thread states modified. If it returns 0, the thread ID is invalid. If it returns >1, multiple thread states were affected (shouldn't happen but indicates a serious issue).

Suggested change
def raise_async_exception(tid, exc_type):
"""Injects an exception into the specified thread."""
if not isinstance(tid, int):
raise TypeError("Thread ID must be an integer")
ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid),
ctypes.py_object(exc_type))
def raise_async_exception(tid, exc_type):
"""Injects an exception into the specified thread."""
if not isinstance(tid, int):
raise TypeError("Thread ID must be an integer")
ret = ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid),
ctypes.py_object(exc_type))
if ret == 0:
logging.warning("Thread ID %s not found when injecting exception", tid)
elif ret > 1:
# Revert if we affected multiple threads
ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), None)
raise SystemError(f"PyThreadState_SetAsyncExc affected {ret} threads")
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/common/plugins/parallel_fixture/__init__.py
Line: 38:44

Comment:
The `PyThreadState_SetAsyncExc` call doesn't check the return value. According to Python docs, it returns the number of thread states modified. If it returns 0, the thread ID is invalid. If it returns >1, multiple thread states were affected (shouldn't happen but indicates a serious issue).

```suggestion
def raise_async_exception(tid, exc_type):
    """Injects an exception into the specified thread."""
    if not isinstance(tid, int):
        raise TypeError("Thread ID must be an integer")

    ret = ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid),
                                                      ctypes.py_object(exc_type))
    if ret == 0:
        logging.warning("Thread ID %s not found when injecting exception", tid)
    elif ret > 1:
        # Revert if we affected multiple threads
        ctypes.pythonapi.PyThreadState_SetAsyncExc(ctypes.c_long(tid), None)
        raise SystemError(f"PyThreadState_SetAsyncExc affected {ret} threads")
```

How can I resolve this? If you propose a fix, please make it concise.

try:
return func(*args, **kwargs)
except Exception:
raise sys.exc_info()[0](traceback.format_exc())
Copy link

Choose a reason for hiding this comment

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

The exception re-raising logic uses deprecated sys.exc_info()[0] and loses the original exception chain. This makes debugging harder and may not properly preserve the exception context.

Suggested change
raise sys.exc_info()[0](traceback.format_exc())
raise
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/common/plugins/parallel_fixture/__init__.py
Line: 266:266

Comment:
The exception re-raising logic uses deprecated `sys.exc_info()[0]` and loses the original exception chain. This makes debugging harder and may not properly preserve the exception context.

```suggestion
                raise
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +393 to +394
self.active_futures.clear()
self.done_futures.clear()
Copy link

Choose a reason for hiding this comment

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

Clearing the futures before termination check creates a race condition. If terminate() hasn't been called yet, clearing these sets will lose track of active tasks. The terminated flag should be checked before clearing.

Suggested change
self.active_futures.clear()
self.done_futures.clear()
if not self.terminated:
raise RuntimeError("Cannot reset a running parallel fixture manager.")
self.active_futures.clear()
self.done_futures.clear()
Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/common/plugins/parallel_fixture/__init__.py
Line: 393:394

Comment:
Clearing the futures before termination check creates a race condition. If `terminate()` hasn't been called yet, clearing these sets will lose track of active tasks. The `terminated` flag should be checked before clearing.

```suggestion
        if not self.terminated:
            raise RuntimeError("Cannot reset a running parallel fixture manager.")
        
        self.active_futures.clear()
        self.done_futures.clear()
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +388 to +398
def reset(self):
"""Reset the parallel fixture manager."""
if not self.terminated:
raise RuntimeError("Cannot reset a running parallel fixture manager.")

self.active_futures.clear()
self.done_futures.clear()
self.executor = ThreadPoolExecutor(max_workers=self.worker_count)
self.is_monitor_running = True
self.monitor_thread = threading.Thread(target=self._monitor_workers, daemon=True)
self.monitor_thread.start()
Copy link

Choose a reason for hiding this comment

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

reset() doesn't set self.terminated = False after resetting the executor. This means once terminated, the manager can never be used again because terminate() will immediately return at line 335 due to the terminated check. Either reset should set terminated = False, or the design should clarify if reset is only for internal reuse.

Prompt To Fix With AI
This is a comment left during a code review.
Path: tests/common/plugins/parallel_fixture/__init__.py
Line: 388:398

Comment:
`reset()` doesn't set `self.terminated = False` after resetting the executor. This means once terminated, the manager can never be used again because `terminate()` will immediately return at line 335 due to the terminated check. Either reset should set `terminated = False`, or the design should clarify if reset is only for internal reuse.

How can I resolve this? If you propose a fix, please make it concise.

@lolyu lolyu force-pushed the parallel_manager2 branch 9 times, most recently from 70897f8 to 9f0c4af Compare February 10, 2026 06:30
lolyu pushed a commit that referenced this pull request Mar 10, 2026
…nter and global_pause test-script (sonic-net#22490)

Description of PR
Added support for tgen_port_info in:
tests/snappi_tests/pfc/test_global_pause_with_snappi.py
tests/snappi_tests/pfc/test_tx_drop_counter_with_snappi.py

Summary:
Fixes # (issue)

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202205
 202305
 202311
 202405
 202411
 202505
 202511
Approach
What is the motivation for this PR?
The tgen_port_info was added as part of Snappi test infra improvement, which enabled users to select between static (from variables.override.yml) and dynamic (select 100 and 400Gbps ports) ports.

This was NOT included in test_tx_drop_counter and test_global_pause test-scripts under snappi_tests/pfc section.

How did you do it?
Imported the tgen_port_info from snappi_fixtures.py and removed any reference to old setup_dut_port function for both test-scripts.

How did you verify/test it?
Verification on 202511 is present in pull-request sonic-net#22380.

Verification steps for master:

azureuser@7e081020c2c7:/data/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern ixre-egl-board73,ixre-egl-board74 --testbed ixre-chassis17-t2 --testbed_file ../ansible/testbed.csv --show-capture=stdout --log-cli-level info --showlocals -ra --allow_recover --junit-xml=/tmp/y.xml --skip_sanity --log-file=/tmp/y.log --topology multidut-tgen -cache-clear --disable_loganalyzer snappi_tests/pfc/test_global_pause_with_snappi.py --pdb
Fri Feb 20 00:07:16 UTC 2026
====================================================================================================================== test session starts =======================================================================================================================
platform linux -- Python 3.8.10, pytest-7.4.0, pluggy-1.5.0
---- curtailed output ----

INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.014s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 1.261s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.116s

---- curtailed output ----
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Flows stop 5.353s
PASSED                                                                                                                                                                                                                                                     [ 50%]
---- curtailed output ----
INFO     tests.common.plugins.memory_utilization:__init__.py:64 Before test: collected memory_values {'before_test': {}, 'after_test': {}}
------------------------------------------------------------------------------------------------------------------------- live log call --------------------------------------------------------------------------------------------------------------------------
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.014s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 1.059s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.110s
---- curtailed output ----
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Flows stop 5.514s
PASSED                                                                                                                                                                                                                                                     [100%]
---- curtailed output ----
----------------------------------------------------------------------------------------------------------------- generated xml file: /tmp/y.xml -----------------------------------------------------------------------------------------------------------------
--------------------------------------------------------------------------------------------------------------------- live log sessionfinish ---------------------------------------------------------------------------------------------------------------------
INFO     root:__init__.py:67 Can not get Allure report URL. Please check logs
=========================================================================================================== 2 passed, 9 warnings in 789.04s (0:13:09) ============================================================================================================
INFO:root:Can not get Allure report URL. Please check logs

azureuser@7e081020c2c7:/data/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern ixre-egl-board73,ixre-egl-board74 --testbed ixre-chassis17-t2 --testbed_file ../ansible/testbed.csv --show-capture=stdout --log-cli-level info --showlocals -ra --allow_recover --junit-xml=/tmp/y.xml --skip_sanity --log-file=/tmp/y.log --topology multidut-tgen -cache-clear --disable_loganalyzer snappi_tests/pfc/test_tx_drop_counter_with_snappi.py --pdb
Fri Feb 20 00:21:03 UTC 2026
---- curtailed output ----
INFO     ixnetwork_restpy.connection:connection.py:329 User info IxNetwork/tgen-ixia-03/admin-112-3670867
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 snappi-1.27.1
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 snappi_ixnetwork-1.27.2
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 ixnetwork_restpy-1.6.1
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.000s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 0.213s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.122s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Aggregation mode speed change 0.000s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Location configuration 0.288s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Layer1 configuration 0.000s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Lag Configuration 0.061s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Convert device config : 0.155s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Create IxNetwork device config : 0.000s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Push IxNetwork device config : 0.093s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Devices configuration 0.299s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Flows configuration 0.120s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Start interfaces 0.155s
INFO     root:__init__.py:76 -------------------- fixture tgen_port_info setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture disable_pfcwd setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture disable_pfcwd setup ends --------------------
INFO     root:conftest.py:3818 skip setup dualtor mux cables on non-dualtor testbed
---- curtailed output ----
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Config validation 0.012s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Ports configuration 1.265s
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Captures configuration 0.112s
---- curtailed output ----
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
---- curtailed output ----
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Link State operation 0.052s
INFO     tests.snappi_tests.pfc.files.helper:helper.py:452 Snappi port Port 0 is set to DOWN
INFO     tests.snappi_tests.pfc.files.helper:helper.py:457 Sleeping for 90 seconds
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Link State operation 0.058s
INFO     tests.snappi_tests.pfc.files.helper:helper.py:469 Snappi port Port 0 is set to UP
---- curtailed output ----
INFO     root:__init__.py:67 Can not get Allure report URL. Please check logs
=========================================================================================================== 2 passed, 9 warnings in 906.71s (0:15:06) ============================================================================================================
INFO:root:Can not get Allure report URL. Please check logs

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>

* snappi: issue-22363 removed multidut-port-info import from pfc tx_drop_counter testcase

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>

---------

Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
lolyu pushed a commit that referenced this pull request Mar 10, 2026
…ion (sonic-net#22504)

Description of PR
The tgen_port_info infra function in common/snappi_tests/snappi_fixtures.py is used to select port (dynamically or statically) for the test. During static port selection, the variables.override.yml file is used to select Rx and Tx port for the test.

However, after the test, there was no explicit test clean_up code. This PR addresses it.

Summary:
Fixes sonic-net#20993

Type of change
 Bug fix
 Testbed and Framework(new/improvement)
 New Test case
 Skipped for non-supported platforms
 Test case improvement
Back port request
 202205
 202305
 202311
 202405
 202411
 202505
 202511
Approach
What is the motivation for this PR?
The tgen_port_info is used to select the Rx and Tx port for the test.

In case of static port selection, the function returned snappi_dut_base_config(duthosts, snappi_ports, snappi_api, setup=True), and there was no explicit cleanup after the test.

How did you do it?
If the 'is_override' flag is true, the static port selection code is used to select Rx and Tx ports from variables.override.yml file.
Instead of returning with function 'snappi_dut_base_config', 'yield' is called to ensure that clean-up is called at the end of the test.
Once yield returns back to the test, then 'setup_dut_ports' is called with setup=False to ensure that clean-up happens after the test.
How did you verify/test it?
For verification of this changes on 202511 branch, please refer to PR sonic-net#22441

Verification of the PR on master with multi-dut setup:

azureuser@7e081020c2c7:/data/tests$ date;python3 -m pytest --inventory ../ansible/ixia-sonic --host-pattern ixre-egl-board73,ixre-egl-board74 --testbed ixre-chassis17-t2 --testbed_file ../ansible/testbed.csv --show-capture=stdout --log-cli-level info --showlocals -ra --allow_recover --junit-xml=/tmp/y.xml --skip_sanity --log-file=/tmp/y.log --topology multidut-tgen -cache-clear --disable_loganalyzer snappi_tests/pfc/test_pfc_pause_lossless_with_snappi.py -k test_pfc_pause_multi_lossless_prio --pdb
Fri Feb 20 14:26:57 UTC 2026
================================================================================================= test session starts =================================================================================================
platform linux -- Python 3.8.10, pytest-7.4.0, pluggy-1.5.0
----------- curtailed output ----------
INFO     tests.conftest:conftest.py:691 Randomly select dut ixre-egl-board73 for testing
INFO     root:__init__.py:81 -------------------- fixture enable_packet_aging_after_test setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture enable_packet_aging_after_test setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture rand_lossless_prio setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture rand_lossless_prio setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture rand_lossy_prio setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture rand_lossy_prio setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture start_pfcwd_after_test setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture start_pfcwd_after_test setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture disable_voq_watchdog setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture disable_voq_watchdog setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture number_of_tx_rx_ports setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture number_of_tx_rx_ports setup ends --------------------
INFO     root:__init__.py:69 -------------------- fixture snappi_api_serv_ip setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture snappi_api_serv_ip setup ends --------------------
INFO     root:__init__.py:69 -------------------- fixture snappi_api_serv_port setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture snappi_api_serv_port setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture snappi_api setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture snappi_api setup ends --------------------
INFO     tests.conftest:conftest.py:727 Randomly select dut ixre-egl-board74 for testing
INFO     root:__init__.py:69 -------------------- fixture prio_dscp_map setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture prio_dscp_map setup ends --------------------
INFO     root:__init__.py:69 -------------------- fixture all_prio_list setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture all_prio_list setup ends --------------------
INFO     root:__init__.py:69 -------------------- fixture lossless_prio_list setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture lossless_prio_list setup ends --------------------
INFO     root:__init__.py:69 -------------------- fixture lossy_prio_list setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture lossy_prio_list setup ends --------------------
INFO     root:__init__.py:69 -------------------- fixture get_snappi_ports setup starts --------------------
INFO     root:__init__.py:69 -------------------- fixture get_snappi_ports_multi_dut setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture get_snappi_ports_multi_dut setup ends --------------------
INFO     root:__init__.py:76 -------------------- fixture get_snappi_ports setup ends --------------------
INFO     root:__init__.py:69 -------------------- fixture snappi_port_selection setup starts --------------------
INFO     root:__init__.py:76 -------------------- fixture snappi_port_selection setup ends --------------------
INFO     root:__init__.py:77 Log analyzer is disabled
INFO     root:__init__.py:81 -------------------- fixture disable_pfcwd setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture disable_pfcwd setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture tgen_port_info setup starts --------------------
----------- curtailed output ----------
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Start interfaces 0.164s
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:906 Found relevant portchannel interfaces
INFO     root:__init__.py:85 -------------------- fixture tgen_port_info setup ends --------------------
INFO     root:conftest.py:3819 skip setup dualtor mux cables on non-dualtor testbed
INFO     tests.common.plugins.memory_utilization:__init__.py:64 Before test: collected memory_values {'before_test': {}, 'after_test': {}}
----------- curtailed output ----------
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:784 Polling DUT for traffic statistics for 23 seconds ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:803 Polling TGEN for in-flight traffic statistics...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:824 In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4', 'Background Flow Prio 1', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:825 In-flight TX frames: [68216, 68215, 81896551, 81896551, 81896551, 81896551, 81896551]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:826 In-flight RX frames: [0, 0, 81896551, 81896551, 81896551, 81896551, 81896551]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:832 In-flight traffic statistics for flows:
----------- curtailed output ----------
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:837 DUT polling complete
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:850 Checking if all flows have stopped. Attempt #1
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:856 All test and background traffic flows stopped
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:894 Dumping per-flow statistics
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:899 Stopping transmit on all remaining flows
INFO     snappi_ixnetwork.snappi_api:snappi_api.py:1419 Flows stop 6.608s
PASSED                                                                                                                                                                                                          [ 50%]
----------- curtailed output ----------
INFO     root:__init__.py:81 -------------------- fixture disable_pfcwd setup starts --------------------
INFO     root:__init__.py:85 -------------------- fixture disable_pfcwd setup ends --------------------
INFO     root:__init__.py:81 -------------------- fixture tgen_port_info setup starts --------------------
INFO     tests.common.snappi_tests.snappi_fixtures:snappi_fixtures.py:906 Found relevant portchannel interfaces
INFO     root:__init__.py:85 -------------------- fixture tgen_port_info setup ends --------------------
INFO     root:conftest.py:3819 skip setup dualtor mux cables on non-dualtor testbed
----------- curtailed output ----------
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:784 Polling DUT for traffic statistics for 27 seconds ...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:803 Polling TGEN for in-flight traffic statistics...
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:824 In-flight traffic statistics for flows: ['Test Flow Prio 3', 'Test Flow Prio 4', 'Background Flow Prio 1', 'Background Flow Prio 5', 'Background Flow Prio 6', 'Background Flow Prio 2', 'Background Flow Prio 0']
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:825 In-flight TX frames: [68221, 68222, 99137931, 99137931, 99137931, 99137931, 99137931]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:826 In-flight RX frames: [0, 0, 99137931, 99137931, 99137931, 99137931, 99137931]
INFO     tests.common.snappi_tests.traffic_generation:traffic_generation.py:832 In-flight traffic statistics for flows:
----------- curtailed output ----------
INFO     tests.conftest:conftest.py:3097 Dumping Disk and Memory Space information after test on ixre-egl-board73
INFO     tests.conftest:conftest.py:3097 Dumping Disk and Memory Space information after test on ixre-egl-board74
INFO     tests.conftest:conftest.py:3101 Collecting core dumps after test on ixre-egl-board74
INFO     tests.conftest:conftest.py:3101 Collecting core dumps after test on ixre-egl-board73
INFO     tests.conftest:conftest.py:3112 Collecting running config after test on ixre-egl-board74
INFO     tests.conftest:conftest.py:3112 Collecting running config after test on ixre-egl-board73
INFO     tests.conftest:conftest.py:3259 Core dump and config check passed for test_pfc_pause_lossless_with_snappi.py
----------- curtailed output ----------
----------------------------------------------------------------------------------------------- live log sessionfinish ------------------------------------------------------------------------------------------------
INFO     root:__init__.py:67 Can not get Allure report URL. Please check logs
============================================================================== 2 passed, 14 deselected, 10 warnings in 808.66s (0:13:28) ==============================================================================
INFO:root:Can not get Allure report URL. Please check logs


Signed-off-by: amitpawa <amit.2.pawar@nokia.com>
@lolyu lolyu force-pushed the parallel_manager2 branch from 9f0c4af to 758e07c Compare March 11, 2026 01:06
lolyu added 11 commits March 20, 2026 05:04
Signed-off-by: Longxiang <lolv@microsoft.com>
Signed-off-by: Longxiang <lolv@microsoft.com>
Signed-off-by: Longxiang <lolv@microsoft.com>
Signed-off-by: Longxiang <lolv@microsoft.com>
Signed-off-by: Longxiang <lolv@microsoft.com>
Signed-off-by: Longxiang <lolv@microsoft.com>
Signed-off-by: Longxiang <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
lolyu added 7 commits March 20, 2026 05:04
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
Signed-off-by: Longxiang Lyu <lolv@microsoft.com>
@lolyu lolyu force-pushed the parallel_manager2 branch from 965b679 to 4df4589 Compare March 20, 2026 05:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant