From: Liam Beguin <liambeguin@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Peter Rosin <peda@axentia.se>,
Jonathan Cameron <jic23@kernel.org>,
Andy Shevchenko <andy.shevchenko@gmail.com>,
Lars-Peter Clausen <lars@metafoo.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-iio@vger.kernel.org,
"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS"
<devicetree@vger.kernel.org>, Rob Herring <robh+dt@kernel.org>
Subject: Re: [PATCH v15 06/10] iio: test: add basic tests for the iio-rescale driver
Date: Tue, 28 Jun 2022 13:06:26 -0400 [thread overview]
Message-ID: <Yrs1EgYZMArqmdb0@shaak> (raw)
In-Reply-To: <CAMuHMdVMhLRS+XuX_8O5UPHzoOp6a6XpTvysQS+nT+GLkL7gjQ@mail.gmail.com>
Hi Geert,
On Mon, Jun 27, 2022 at 09:22:29AM +0200, Geert Uytterhoeven wrote:
> Hi Liam,
>
> On Mon, Feb 14, 2022 at 12:00 AM Liam Beguin <liambeguin@gmail.com> 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@gmail.com>
> > Reviewed-by: Peter Rosin <peda@axentia.se>
>
> Thanks for your patch, which is now commit 8e74a48d17d509bf
> ("iio: test: add basic tests for the iio-rescale driver") in v5.18.
Thanks! I also recently sent a fix for this which recently made it
upstream:
7a2f6f61e8ee ("iio: test: fix missing MODULE_LICENSE for IIO_RESCALE=m")
> > --- 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?
I based this patch off of IIO_TEST_FORMAT, and also thought that Kunit
tests had to be built-in to work with tools/testing/kunit/kunit.py
Looking at the Documentation again, it seems I was (partially?) wrong,
kunit tests can be run as module, but manually.
I could give this a try and send a patch in the next few days.
Cheers,
Liam
> > + 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@linux-m68k.org
>
> 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
next prev parent reply other threads:[~2022-06-28 17:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-13 2:57 [PATCH v15 00/10] iio: afe: add temperature rescaling support Liam Beguin
2022-02-13 2:57 ` [PATCH v15 01/10] iio: afe: rescale: expose scale processing function Liam Beguin
2022-02-13 2:57 ` [PATCH v15 02/10] iio: afe: rescale: add INT_PLUS_{MICRO,NANO} support Liam Beguin
2022-02-13 2:57 ` [PATCH v15 03/10] iio: afe: rescale: add offset support Liam Beguin
2022-02-13 2:57 ` [PATCH v15 04/10] iio: afe: rescale: fix accuracy for small fractional scales Liam Beguin
2022-02-13 2:57 ` [PATCH v15 05/10] iio: afe: rescale: reduce risk of integer overflow Liam Beguin
2022-02-13 2:57 ` [PATCH v15 06/10] iio: test: add basic tests for the iio-rescale driver Liam Beguin
2022-06-27 7:22 ` Geert Uytterhoeven
2022-06-28 17:06 ` Liam Beguin [this message]
2022-02-13 2:57 ` [PATCH v15 07/10] iio: afe: rescale: add RTD temperature sensor support Liam Beguin
2022-02-13 2:57 ` [PATCH v15 08/10] iio: afe: rescale: add temperature transducers Liam Beguin
2022-02-13 2:57 ` [PATCH v15 09/10] dt-bindings: iio: afe: add bindings for temperature-sense-rtd Liam Beguin
2022-02-13 2:57 ` [PATCH v15 10/10] dt-bindings: iio: afe: add bindings for temperature transducers Liam Beguin
2022-02-27 12:55 ` [PATCH v15 00/10] iio: afe: add temperature rescaling support Jonathan Cameron
2022-02-27 13:05 ` Jonathan Cameron
2022-02-27 13:25 ` Andy Shevchenko
2022-02-27 13:39 ` Jonathan Cameron
2022-02-28 16:45 ` Liam Beguin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yrs1EgYZMArqmdb0@shaak \
--to=liambeguin@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=geert@linux-m68k.org \
--cc=jic23@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).