[PATCH v7 i-g-t 1/3] runner/kmemleak: library to interact with kmemleak

Kamil Konieczny kamil.konieczny at linux.intel.com
Thu Mar 6 12:32:29 UTC 2025


Hi Peter,
On 2025-02-28 at 08:04:30 +0100, Peter Senna Tschudin wrote:
> 
> 
> On 27.02.2025 11:18, Peter Senna Tschudin wrote:
> > Adds a simple library for interacting with kmemleak and add
> > unit testing for the library. There are two modes intended to
> > integrate with igt_runner:
> > - once: collect kmemleaks after all test completed
> > - each: collect kmemleaks after eachb test completes
> > 
> > To use the library include "kmemleak.h", call runner_kmemleak_init()
> > to check if kmemleak is enabled and finally call runner_kmemleak()
> > to collect kmemleaks. runner_kmemleak() expect the following
> > arguments:
> >   - const char *last_test: Name of the last lest or NULL
> >   - int resdirfd: file descriptor of the results directory
> >   - bool kmemleak_each: Are we scanning once or scanning after
> >     each test?
> >   - bool sync: sync after each write?
> > 
> > Cc: christian.koenig at amd.com
> > Cc: alexander.deucher at amd.com
> > Cc: jesse.zhang at amd.com
> > Cc: harry.wentland at amd.com
> > Cc: zbigniew.kempczynski at intel.com
> > Cc: kamil.konieczny at linux.intel.com
> > Cc: ryszard.knop at intel.com
> > Cc: lucas.demarchi at intel.com
> > Cc: katarzyna.piecielska at intel.com
> Reviewed-by: Vitaly Prosyak <vitaly.prosyak at amd.com>

A note to Peter for future reference: please send such r-b
additions with at least a word or two why and from where
it comes, give a link to lore.kernel.org or to patchwork
so you will make my work easy and do not require from me
to search your other mailing threads.

You could also remind about it a maintainer to add this at merge
or send new release with this added, then an explanation will
naturally appear in release notes in cover letter.

Regards,
Kamil

> > Reviewed-by: Zbigniew Kempczyński <zbigniew.kempczynski at intel.com>
> > Reviewed-by: Jonathan Cavitt <jonathan.cavitt at intel.com>
> > Signed-off-by: Peter Senna Tschudin <peter.senna at linux.intel.com>
> > ---
> >  runner/kmemleak.c             | 273 ++++++++++++++++++++++++++++++++++
> >  runner/kmemleak.h             |  16 ++
> >  runner/meson.build            |  11 +-
> >  runner/runner_kmemleak_test.c | 267 +++++++++++++++++++++++++++++++++
[...]



More information about the igt-dev mailing list