Re: [PATCH v2 10/11] kcov: selftests: add kcov_test
From: Alexander Potapenko
Date: Fri Jul 25 2025 - 10:38:06 EST
On Wed, Jul 9, 2025 at 5:15 PM Dmitry Vyukov <dvyukov@xxxxxxxxxx> wrote:
>
> On Thu, 26 Jun 2025 at 15:42, Alexander Potapenko <glider@xxxxxxxxxx> wrote:
> >
> > Implement test fixtures for testing different combinations of coverage
> > collection modes:
> > - unique and non-unique coverage;
> > - collecting PCs and comparison arguments;
> > - mapping the buffer as RO and RW.
> >
> > To build:
> > $ make -C tools/testing/selftests/kcov kcov_test
> >
> > Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx>
> > ---
> > MAINTAINERS | 1 +
> > tools/testing/selftests/kcov/Makefile | 6 +
> > tools/testing/selftests/kcov/kcov_test.c | 364 +++++++++++++++++++++++
>
> Let's also add 'config' fragment (see e.g. ./dma/config)
> Otherwise it's impossible to run these tests in automated fashion.
Done in v3.
> > +/* Normally these defines should be provided by linux/kcov.h, but they aren't there yet. */
>
> Then I think we need to do:
> #ifndef KCOV_UNIQUE_ENABLE
Good point!