Skip to content

Conversation

@lgirdwood
Copy link
Member

Add some improvements to support valgrind and eliminate all valgrind errors. Also allow users to specify number of copies.

lrgirdwo added 5 commits June 27, 2021 20:47
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>
@lgirdwood lgirdwood force-pushed the lrg/topic/testbench2 branch from d7bff6b to 65c2b3e Compare June 27, 2021 19:48
{
struct sof *sof = (struct sof *)dev;
struct sof_ipc_buffer buffer;
struct sof_ipc_buffer buffer = {0};
Copy link
Collaborator

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?

Copy link
Member Author

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.

Copy link
Collaborator

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?

Copy link
Member Author

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.

Copy link
Collaborator

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.

Copy link
Member Author

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};
Copy link
Collaborator

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto as above.

@lgirdwood lgirdwood merged commit eb7add5 into main Jun 29, 2021
@lgirdwood lgirdwood deleted the lrg/topic/testbench2 branch June 29, 2021 10:06
marc-hb added a commit to marc-hb/sof that referenced this pull request Jul 3, 2021
'const' documents APIs and catches bugs.

This came while discussing thesofproject#4408

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
lgirdwood pushed a commit that referenced this pull request Jul 7, 2021
'const' documents APIs and catches bugs.

This came while discussing #4408

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
ranj063 pushed a commit to ranj063/sof that referenced this pull request Jul 16, 2021
'const' documents APIs and catches bugs.

This came while discussing thesofproject#4408

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
lgirdwood pushed a commit that referenced this pull request Jul 16, 2021
'const' documents APIs and catches bugs.

This came while discussing #4408

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants