[PATCH] lib/amd: add memleak functions

vitaly prosyak vprosyak at amd.com
Thu Feb 27 05:08:19 UTC 2025


On 2025-02-26 05:24, Peter Senna Tschudin wrote:
>
> On 26.02.2025 11:09, Zbigniew Kempczyński wrote:
>> On Wed, Feb 26, 2025 at 10:43:08AM +0100, Peter Senna Tschudin wrote:
>>> Hello Vitaly,
>>>
>>> On 26.02.2025 10:09, Zbigniew Kempczyński wrote:
>>>> On Wed, Feb 19, 2025 at 12:50:49PM -0500, vitaly prosyak wrote:
>>>>> Hi Kamil,
>>>>>
>>>>> Thanks for raising this question. Currently, only a single test uses the memleak feature. However, we are planning to add more. This effort requires careful selection, as we want to avoid unnecessary overhead or burden. Enabling the memleak configuration significantly slows down test execution—potentially increasing the duration by 2-3 times.
>>>>>
>>>>> Additionally, we aim to reach internal consensus on which tests should have this feature enabled. We also want to avoid enabling both KASAN and memleak simultaneously. These considerations are the reason for the delay.
>>>>>
>>>>> Thanks for your understanding!
>>>>>
>>>>> Vitaly
>>>> +Peter
>>>>
>>>> Peter proposed solution which is global and vendor agnostic. I mean
>>>> his changes https://patchwork.freedesktop.org/series/143996/
>>>> allow you to selectively run with kmemleak on using runner (-k).
>>>> Together with proper list selection passed to the runner you're
>>>> able to run only tests which you want to check for memory leaks.
>>> Thank you, Zbigniew! Just to clarify, my patch currently supports:
>>>  -konce, which collects a single kmemleak log after all tests have run.
>>>  -keach, which collects kmemleak logs after each test.
>>>
>>> However, after reading this discussion, I came up with a proposal for a
>>> new option: -kfile. With this mode, igt_runner will collect kmemleak
>>> logs only after running the tests specified in a given text file.
>> You don't need this, testlist is your file.
> Yes, indeed. A test list + -keach does it. Vitaly would you comment about
> the current approach in the context of your needs?
Hi Peter,

Thanks for the update! I really appreciate the effort you’ve put into making the approach more global and vendor-agnostic—great work!

It would be incredibly useful to have both --kmemleak options available (for the entire test list and individual tests).

Could you kindly provide guidance on how to add these options (-konce or -keach) to igt-runner? For example, how should I modify the following commands to include them?

sudo ./scripts/run-tests.sh -t -v /home/vprosyak/src/igt-gpu-tools/build/tests/amd/amd_basic  

or

sudo ./scripts/run-tests.sh -v -T /home/infra/igt/custom.testlist  

Thanks again for your great work and support!

Vitaly
> [...]


More information about the igt-dev mailing list