-
Notifications
You must be signed in to change notification settings - Fork 349
Tools: Test: Audio: Valgrind run related fixes #7719
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
marc-hb
left a comment
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.
Should there be a Fixes commit abcdedf in the commit message?
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.
Because rcmd may print stuff too:
| fprintf('Returned status %d\n', ret); | |
| printf('%s eturned status %d\n', rcmd, ret); |
Can't you combine fprintf and error into one? I hope one does not print on stdout while the other on stderr because buffering could order them randomly.
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.
Error can't do the same as print but I can remove all print from error.
There's also quit() and exit() but the problem is that when working in interactive Octave or Matlab desktop they exit the desktop. And with Matlab due licence server the start is annoying slow so I don't want to use it.
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.
Re-read the manual, today error in octave can do same as printf... and so does Matlab. It was an old limitation that no more bothers. Good that you asked!
283934c to
db75a33
Compare
ShriramShastry
left a comment
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.
Please have a look at my comments, which I've added.
Thank you very much.
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.
At line number 58, fprintf(fh, '#!/bin/sh\n', test.comp); Isn't the output format strange?
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.
Good catch: it does look like a bug but how is it related to 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.
Yep, I can add a fix commit to this PR. Strange that this is not causing errors.
tools/test/audio/process_test.m
Outdated
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.
At line number 101, tn = 1;, tn is not used; please consider using it or removing it.
At line number 321, min_bits = min(test.bits_in, test.bits_out);, do you intend to use minimum bits elsewhere ? Otherwise, it's unnecessary code that should be removed.
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.
@ShriramShastry how is this related to 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.
It has nothing to do with PR and does not rely on PR to succeed. A little correction can help greatly improve code quality, and I believe Seppo won't mind (because he wrote the majority of the code) considering the proposal.
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.
These look like interesting suggestions but they're still off-topic here.
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.
Hmm - sure it's off the topic, what are your thoughts if you notice improvement and believe that rectification would be beneficial without adding extra work? I am not sure if the chosen approach is OK or NOT, and for the PR, I request Seppo to consider but leave the decision to him.
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 for suggestions. They are better to leave to another PR later. If you like you are welcome to make a PR since you found them. Or I can do later when time, as you prefer.
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 would want to propose that you incorporate it as well as as you can take over
Thank you!!
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.
Hmm - sure it's off the topic, what are your thoughts if you notice improvement and believe that rectification would be beneficial without adding extra work?
The very first thing when making slightly off-topic comments is to clearly warn that they are off-topic to save confusion and time. A simple "off-topic" prefix is enough. Try putting yourself in the shoes of maintainers who have to review a lot of PRs and switch context many times per day.
If some comments are totally off-topic then there are many other places. Email or instant messaging of course, or you can submit a throw-away, draft PR, or you can start a new github issue or discussion, maybe a github gist. You can also git blame the code and comment in the old, merged PR where the code appeared in the first place. Some people don't like the last option (I do). There are really a lot of options that don't noise and slow down unrelated PRs.
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.
tools/test/audio/process_test.m
Outdated
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.
Minor nit: the "Fixes commit-id" tag not quite following Linux style.
If your patch fixes a bug in a specific commit, e.g. you found an issue using
``git bisect``, please use the 'Fixes:' tag with the first 12 characters of
the SHA-1 ID, and the one line summary. Do not split the tag across multiple
lines, tags are exempt from the "wrap at 75 columns" rule in order to simplify
parsing scripts. For example::
» Fixes: 54a4f0239f2e ("KVM: MMU: make kvm_mmu_zap_page() return the number of pages it actually freed")
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.
There are git scripts that scan branches for that specific Fixes: syntax.
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.
The commit message is now fixed. You may want to re-review because of 2nd commit added to fix the syntax error found by Sriram. And strange that it didn't error.
The changes to scripts/host-testbench.sh and earlier to process_test.m have unintentionally dropped valgrind run from test. This patch enables valgrind for process_test.m runs and fixes issue in test run octave side function to silently ignore error about failed shell command. Normally test fail when there is no data or incorrect data, but a valgrind failure with correct test output was passed. Valgrind output becomes visible if testbench run trace stderr redirection to file is disabled. If not done valgrind error would stop the test but the analysis would not be printed to console. Fixes: 6b744bc ("host-testbench.sh: use process_test.m for 8 components") Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
The fprintf() command prints only "#!/bin/sh". For some reason this has been ignored by interpreter but as clear error it is better to fix. Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
db75a33 to
127e98f
Compare
ShriramShastry
left a comment
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 for making the change; they now appear good to me.
The changes to scripts/host-testbench.sh have unintentionally dropped valgrind run from test.
This patch enables valgrind for process_test.m runs and fixes issue in test run octave side function to silently ignore error about failed shell command. Normally test fail when there is no data or incorrect data, but a valgrind failure with correct test output was passed.
Valgrind output becomes visible if testbench run trace stderr redirection to file is disabled. If not done valgrind error would stop the test but the analysis would not be printed to console.