Re: [PATCH v15 06/10] iio: test: add basic tests for the iio-rescale driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Liam,

On Mon, Feb 14, 2022 at 12:00 AM Liam Beguin <liambeguin@xxxxxxxxx> wrote:
> The iio-rescale driver supports various combinations of scale types and
> offsets. These can often result in large integer multiplications. Make
> sure these calculations are done right by adding a set of kunit test
> cases that build on top of iio-test-format.
>
> To run these tests, add the following to .kunitconfig
>         $ cat .kunitconfig
>         CONFIG_IIO=y
>         CONFIG_IIO_RESCALE_KUNIT_TEST=y
>         CONFIG_KUNIT=y
>
> Then run:
>         $ ./tools/testing/kunit/kunit.py run --kunitconfig .kunitconfig
>
> Signed-off-by: Liam Beguin <liambeguin@xxxxxxxxx>
> Reviewed-by: Peter Rosin <peda@xxxxxxxxxx>

Thanks for your patch, which is now commit 8e74a48d17d509bf
("iio: test: add basic tests for the iio-rescale driver") in v5.18.

> --- a/drivers/iio/test/Kconfig
> +++ b/drivers/iio/test/Kconfig
> @@ -4,6 +4,16 @@
>  #
>
>  # Keep in alphabetical order
> +config IIO_RESCALE_KUNIT_TEST
> +       bool "Test IIO rescale conversion functions"

Is there any reason this cannot be tristate, so I can always enable
this as a module, and run the test by loading the module whenever
I want?

> +       depends on KUNIT && !IIO_RESCALE
> +       default KUNIT_ALL_TESTS
> +       help
> +         If you want to run tests on the iio-rescale code say Y here.
> +
> +         This takes advantage of ARCH=um to run tests and should be used by
> +         developers to tests their changes to the rescaling logic.
> +
>  config IIO_TEST_FORMAT
>          bool "Test IIO formatting functions"
>          depends on KUNIT=y

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux