-
Notifications
You must be signed in to change notification settings - Fork 59
case-lib/lib.sh: add new fake_kern_error() #361
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
xiulipan
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.
@marc-hb why this fake_kern_error function is needed? And where we will use this function?
Please also add some explanation in the commit.
|
@xiulipan what part of the commit message needs more detail? |
|
@marc-hb For the commit PS: will this function take effect also with journalctl? |
Sort of fixes commit 8b02299 ("fix pulseaudio re-start command line"). The whole pulseaudio situation is a mess anyway, see PR thesofproject#300 and others. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
65966a7 to
875acd9
Compare
|
Thanks @xiulipan for the review, I added more details.
Yes. Unlike |
This function adds a fake error to dmesg. It is surprisingly easy to write a test that always succeeds, especially in shell script and it has already happened a number of times. Temporarily add this function to a test under development to make sure it can actually report failures. Using this function is even more critical for testing changes to the test framework and especially error handling code. Signed-off-by: Marc Herbert <marc.herbert@intel.com>
875acd9 to
ecfa312
Compare
|
@marc-hb I got the idea now. Can you also add some DEBUG prefix in commit and inline comments to show this function should only be used for debug. PS: I think it would be better if you can have some unit test for our lib with this debug or test function. |
Needed to (manually and locally) test our overly complex error handling framework, see for instance PR #354
Signed-off-by: Marc Herbert marc.herbert@intel.com