Skip to content

Commit ef5b35f

Browse files
[vstest] VS test failure fix after fabric port orch PR merge (#1811)
* [vstest] VS test failues fix after fabric port orch PR merge *This reverts commit facdef5.
1 parent 89ea538 commit ef5b35f

File tree

2 files changed

+4
-22
lines changed

2 files changed

+4
-22
lines changed

tests/conftest.py

+4-16
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,8 @@
3333
# a dynamic number of ports. GitHub Issue: Azure/sonic-swss#1384.
3434
NUM_PORTS = 32
3535

36-
# FIXME: Voq asics will have 16 fabric ports created (defined in Azure/sonic-buildimage#6185).
37-
# Right now, we set FABRIC_NUM_PORTS to 0, and change to 16 when PR#6185 merges. PR#6185 can't
38-
# be merged before this PR. Otherwise it will cause swss voq test failures.
39-
FABRIC_NUM_PORTS = 0
36+
# Voq asics will have 16 fabric ports created (defined in Azure/sonic-buildimage#7629).
37+
FABRIC_NUM_PORTS = 16
4038

4139
def ensure_system(cmd):
4240
rc, output = subprocess.getstatusoutput(cmd)
@@ -526,22 +524,12 @@ def _polling_function():
526524

527525
# Verify that all ports have been created
528526
asic_db = self.get_asic_db()
529-
530-
# Verify that we have "at least" NUM_PORTS + FABRIC_NUM_PORTS, rather exact number.
531-
# Right now, FABRIC_NUM_PORTS = 0. So it essentially waits for at least NUM_PORTS.
532-
# This will allow us to merge Azure/sonic-buildimage#6185 that creates 16 fabric ports.
533-
# When PR#6185 merges, FABRIC_NUM_PORTS should be 16, and so this verification (at least
534-
# NUM_PORTS) still holds.
535-
# Will update FABRIC_NUM_PORTS to 16, and revert back to wait exact NUM_PORTS + FABRIC_NUM_PORTS
536-
# when PR#6185 merges.
537-
wait_at_least_n_keys = True
538-
539-
asic_db.wait_for_n_keys("ASIC_STATE:SAI_OBJECT_TYPE_PORT", num_ports + 1, wait_at_least_n_keys) # +1 CPU Port
527+
asic_db.wait_for_n_keys("ASIC_STATE:SAI_OBJECT_TYPE_PORT", num_ports + 1) # +1 CPU Port
540528

541529
# Verify that fabric ports are monitored in STATE_DB
542530
if metadata.get('switch_type', 'npu') in ['voq', 'fabric']:
543531
self.get_state_db()
544-
self.state_db.wait_for_n_keys("FABRIC_PORT_TABLE", FABRIC_NUM_PORTS, wait_at_least_n_keys)
532+
self.state_db.wait_for_n_keys("FABRIC_PORT_TABLE", FABRIC_NUM_PORTS)
545533

546534
def net_cleanup(self) -> None:
547535
"""Clean up network, remove extra links."""

tests/test_virtual_chassis.py

-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from swsscommon import swsscommon
32
from dvslib.dvs_database import DVSDatabase
43
import ast
@@ -136,7 +135,6 @@ def test_voq_switch(self, vct):
136135
spcfg = ast.literal_eval(value)
137136
assert spcfg['count'] == sp_count, "Number of systems ports configured is invalid"
138137

139-
@pytest.mark.skip(reason="This test is not stable enough")
140138
def test_chassis_app_db_sync(self, vct):
141139
"""Test chassis app db syncing.
142140
@@ -213,7 +211,6 @@ def test_chassis_system_interface(self, vct):
213211
# Remote system ports's switch id should not match local switch id
214212
assert spcfginfo["attached_switch_id"] != lc_switch_id, "RIF system port with wrong switch_id"
215213

216-
@pytest.mark.skip(reason="This test is not stable enough")
217214
def test_chassis_system_neigh(self, vct):
218215
"""Test neigh record create/delete and syncing to chassis app db.
219216
@@ -470,7 +467,6 @@ def test_chassis_system_neigh(self, vct):
470467
# Cleanup inband if configuration
471468
self.del_inbandif_port(vct, inband_port)
472469

473-
@pytest.mark.skip(reason="This test is not stable enough")
474470
def test_chassis_system_lag(self, vct):
475471
"""Test PortChannel in VOQ based chassis systems.
476472
@@ -607,7 +603,6 @@ def test_chassis_system_lag(self, vct):
607603

608604
break
609605

610-
@pytest.mark.skip(reason="This test is not stable enough")
611606
def test_chassis_system_lag_id_allocator_table_full(self, vct):
612607
"""Test lag id allocator table full.
613608
@@ -685,7 +680,6 @@ def test_chassis_system_lag_id_allocator_table_full(self, vct):
685680

686681
break
687682

688-
@pytest.mark.skip(reason="This test is not stable enough")
689683
def test_chassis_system_lag_id_allocator_del_id(self, vct):
690684
"""Test lag id allocator's release id and re-use id processing.
691685

0 commit comments

Comments
 (0)