-
Notifications
You must be signed in to change notification settings - Fork 122
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
Enhancement: Add tmt check for kmemleak #3245
Comments
Thanks @sbertramrh . I think this makes a lot of sense. I would like to add that before the first test execution of the selected plan there should be a scan followed by a clearing the kmleak report (or possibly store it in a special file), so that we do not include leaks from before actually running the first test. |
The check implementation handles two events: Lines 175 to 206 in 14d60dc
I belive the |
We are attempting to automate testing on a debug kernel and want to incorporate triggering a kmemleak scan at the end of each test. If there is memleak detected then save the trace
cat /sys/kernel/debug/kmemlek > $TMT_PLAN_DATA/some_file.log
or any location tmt decides is best.After reading about tmt.check functions I thought this would be a great next step.
So for each test, as with dmesg, we clear at the start:
echo clear > /sys/kernel/debug/kmemleak
Scan at the end:
echo scan > /sys/kernel/debug/kmemleak
(should happen before capturing dmesg)Capture contents of kmemleak as mentioned above. This file maybe empty.
See https://www.kernel.org/doc/html/latest/dev-tools/kmemleak.html
It is essential we get this process automated and this tmt module seems like the right fit for it.
cc: @thrix
The text was updated successfully, but these errors were encountered: