Skip to content

Commit

Permalink
Merge branch 'master' into eni_cntrs
Browse files Browse the repository at this point in the history
  • Loading branch information
vivekrnv authored Aug 26, 2024
2 parents 6fcbf2e + 45ff42c commit be832e5
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 25 deletions.
18 changes: 4 additions & 14 deletions .azure-pipelines/test-docker-sonic-vs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,10 @@ jobs:
fi
all_tests=$(ls test_*.py)
all_tests="${all_tests} p4rt"
test_set=()
# Run 20 tests as a set.
for test in ${all_tests}; do
test_set+=("${test}")
if [ ${#test_set[@]} -ge 20 ]; then
test_name=$(echo "${test_set[0]}" | cut -d "." -f 1)
echo "${test_set[*]}" | xargs sudo py.test -v --force-flaky --junitxml="${test_name}_tr.xml" $params --imgname=docker-sonic-vs:$(Build.DefinitionName).$(Build.BuildNumber).asan-${{ parameters.asan }}
test_set=()
fi
done
if [ ${#test_set[@]} -gt 0 ]; then
test_name=$(echo "${test_set[0]}" | cut -d "." -f 1)
echo "${test_set[*]}" | xargs sudo py.test -v --force-flaky --junitxml="${test_name}_tr.xml" $params --imgname=docker-sonic-vs:$(Build.DefinitionName).$(Build.BuildNumber).asan-${{ parameters.asan }}
fi
RETRY=3
IMAGE_NAME=docker-sonic-vs:$(Build.DefinitionName).$(Build.BuildNumber).asan-${{ parameters.asan }}
echo $all_tests | xargs -n 1 | xargs -P 8 -I TEST_MODULE sudo ./run-tests.sh "$IMAGE_NAME" "$params" "TEST_MODULE" "$RETRY"
rm -rf $(Build.ArtifactStagingDirectory)/download
displayName: "Run vs tests"
${{ if or(ne(variables['Build.Reason'], 'PullRequest'), eq(parameters.asan, true)) }}:
Expand Down
19 changes: 9 additions & 10 deletions syncd/Syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3753,16 +3753,6 @@ sai_status_t Syncd::processNotifySyncd(

auto& key = kfvKey(kco);
sai_status_t status = SAI_STATUS_SUCCESS;

if (!m_commandLineOptions->m_enableTempView)
{
SWSS_LOG_NOTICE("received %s, ignored since TEMP VIEW is not used, returning success", key.c_str());

sendNotifyResponse(SAI_STATUS_SUCCESS);

return SAI_STATUS_SUCCESS;
}

auto redisNotifySyncd = sai_deserialize_redis_notify_syncd(key);

if (redisNotifySyncd == SAI_REDIS_NOTIFY_SYNCD_INVOKE_DUMP)
Expand All @@ -3779,6 +3769,15 @@ sai_status_t Syncd::processNotifySyncd(
return status;
}

if (!m_commandLineOptions->m_enableTempView)
{
SWSS_LOG_NOTICE("received %s, ignored since TEMP VIEW is not used, returning success", key.c_str());

sendNotifyResponse(SAI_STATUS_SUCCESS);

return SAI_STATUS_SUCCESS;
}

if (m_veryFirstRun && m_firstInitWasPerformed && redisNotifySyncd == SAI_REDIS_NOTIFY_SYNCD_INIT_VIEW)
{
/*
Expand Down
7 changes: 6 additions & 1 deletion syncd/tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ void syncdThread()

auto commandLineOptions = std::make_shared<CommandLineOptions>();

commandLineOptions->m_enableTempView = true;
commandLineOptions->m_enableTempView = false;
commandLineOptions->m_enableUnittests = false;
commandLineOptions->m_disableExitSleep = true;
commandLineOptions->m_profileMapFile = "testprofile.ini";
Expand Down Expand Up @@ -856,6 +856,11 @@ void test_invoke_dump()

ASSERT_SUCCESS("Failed to invoke dump");
assert(mockCallArg == SAI_FAILURE_DUMP_SCRIPT);

attr.id = SAI_REDIS_SWITCH_ATTR_NOTIFY_SYNCD;
attr.value.s32 = SAI_REDIS_NOTIFY_SYNCD_INIT_VIEW;
status = sairedis->set(SAI_OBJECT_TYPE_SWITCH, SAI_NULL_OBJECT_ID, &attr);
ASSERT_SUCCESS("Notify syncd failed");
}

void test_watchdog_timer_clock_rollback()
Expand Down

0 comments on commit be832e5

Please sign in to comment.