-
Notifications
You must be signed in to change notification settings - Fork 309
[syncd] Update log level for bulk api #1492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run |
/AzurePipelines run |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
syncd/tests/TestSyncdMlnx.cpp
Outdated
@@ -78,7 +78,7 @@ void syncdMlnxWorkerThread() | |||
commandLineOptions->m_enableTempView = false; | |||
commandLineOptions->m_disableExitSleep = true; | |||
commandLineOptions->m_enableUnittests = false; | |||
commandLineOptions->m_enableSaiBulkSupport = true; | |||
commandLineOptions->m_enableSaiBulkSupport = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just to leverage the pipeline to check whether coverage can pass in this way. we will have a formal solution if it can.
it's not easy for us to check coverage locally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can actually do it in docker, it will cost you some time to setup this locally, and then you can run gcovr following steps taht are located in *yml files
i don;t have this steps locally, but i usually write unittests for code that i add/change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. indeed. we usually toggle breakpoints and check whether breakpoints are reached.
but sometimes even if the breakpoints are reached, coverage reports uncovered..
we will try steps in yaml.
Looks inside this function in official code, there is some bug: bool VirtualOidTranslator::tryTranslateRidToVid( |
whats the erro you get ? yes that should be rid there, and it needs to be fixed, by lucy coincidence this is always go to client oinstead of cache |
Got this error:TestSyncd.cpp:476: Failure |
is taht error locally only ? since on pipeline all tests pass ok |
Yes, that is local only, seems caused by that port is already removed, but mock still return valid, will add some condition to tell mock that port is already deleted. |
This is not my code since I did not added mock methods, but mock can return independent values than actual function, c |
Log level should be warning instead of error, because functionality is fine. Latter code will fall back to use single api instead of bulk api, when syncd support bulk but sai doesn't support it. Signed-off-by: Jianyue Wu <jianyuew@nvidia.com>
2b19fb6
to
f998032
Compare
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Yes, I tried to rewrite test case, now it is fine, thanks for the hint:) |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
Now coverage passed:) |
It's ironic since changing 1 line of code and adding 10 of unit tests will pass code coverage since unit tests are also included on code coverage 🤣 and the test don't need to do actual testing 😂 |
Ah, yes, that is really tricky😂 BTW, this time I confirmed with GDB, and those logs are indeed covered. |
@jianyuewu , Please provide direct PR to 202411 as this one got conflicts. |
@dprital Thanks for remind, backport PR to 202411 created: #1532 |
Log level should be warning instead of error, because functionality is fine. Latter code will fall back to use single api instead of bulk api, when syncd support bulk but sai doesn't support it.
Background
When syncd added support for bulk APIs like bulk set, but sai didn't implement it, this error will be printed:
"processBulkOidSet: bulk set api is not implemented or not supported, object_type = SAI_OBJECT_TYPE_QUEUE", and it will fail the cases. Actually the print should be warning, as in current code, bulk set fall back to single set in latter code, so sai will still receive single set APIs, so functionality is actually OK.
What I did
Update log level from error to warning.
How to verify it
When bulk set api is added in syncd, but sai did not implement it, only warning logs will be printed, instead of error logs.