-
Notifications
You must be signed in to change notification settings - Fork 349
testbench: improvements for valgrind and debug #4408
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
Buffer and params not initialised to zero like the other IPC structures used by testbench. Fix this. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Lets be more helpful to the user. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Move the comp free to after the results and free the pipeline. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Testbench crashed when a in/out file has not . extension. Fix this. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
All the user to specify the number of copies. Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
d7bff6b to
65c2b3e
Compare
| { | ||
| struct sof *sof = (struct sof *)dev; | ||
| struct sof_ipc_buffer buffer; | ||
| struct sof_ipc_buffer buffer = {0}; |
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.
Isn't the job of tplg_load_buffer() to initialize buffer? What error does this silence?
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.
testbench does not use all the data members as some are specific to HW config. This was only missing from the two "IPCs" in this PR.
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.
I don't understand sorry, I don't have the full picture. What was the error reported and in which function?
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.
Use of uninitialized data in FW buffer logic due to testbench not initializing it. Not an issue with kernel as it clears. Testbench bug.
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.
I understood that the error was testbench specific, my concern is that this change hides any "real" initialization bug in tplg_load_buffer in the future.
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.
Got you now, yep the userspace tplg parser is not setting any variables if it cant find tokens for them. I will fix this as another PR as it means removing more testbench code here and also testing other tools that used the shared tplg parser.
| struct ipc_comp_dev *pcm_dev; | ||
| struct comp_dev *cd; | ||
| struct sof_ipc_pcm_params params; | ||
| struct sof_ipc_pcm_params params = {0}; |
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.
This looks like the initialization of some field(s) is missing below and this is merely hiding the issue.
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.
ditto as above.
'const' documents APIs and catches bugs. This came while discussing thesofproject#4408 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
'const' documents APIs and catches bugs. This came while discussing #4408 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
'const' documents APIs and catches bugs. This came while discussing thesofproject#4408 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
'const' documents APIs and catches bugs. This came while discussing #4408 Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Add some improvements to support valgrind and eliminate all valgrind errors. Also allow users to specify number of copies.