From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Daniel Latypov <dlatypov@google.com>
Cc: brendanhiggins@google.com, davidgow@google.com,
linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com,
linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH v4] lib: add basic KUnit test for lib/math
Date: Fri, 9 Apr 2021 18:30:11 +0300 [thread overview]
Message-ID: <YHBzA7SwH194ywRv@smile.fi.intel.com> (raw)
In-Reply-To: <20210409014001.2946212-1-dlatypov@google.com>
On Thu, Apr 08, 2021 at 06:40:01PM -0700, Daniel Latypov wrote:
> Add basic test coverage for files that don't require any config options:
> * gcd.c
> * lcm.c
> * int_sqrt.c
> * reciprocal_div.c
> (Ignored int_pow.c since it's a simple textbook algorithm.)
What about adding math.h test cases?
We have some macros there and it might be a good idea to test them, for example
that round_up() and roundup() produces the same output for the same (power of
two divisor) input.
> These tests aren't particularly interesting, but they
> * provide short and simple examples of parameterized tests
> * provide a place to add tests for any new files in this dir
> * are written so adding new test cases to cover edge cases should be easy
Yes, that's why I think macros also can be a good example how to test *macro*.
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-04-09 15:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-09 1:40 [PATCH v4] lib: add basic KUnit test for lib/math Daniel Latypov
2021-04-09 15:30 ` Andy Shevchenko [this message]
2021-04-09 16:29 ` Daniel Latypov
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=YHBzA7SwH194ywRv@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=brendanhiggins@google.com \
--cc=davidgow@google.com \
--cc=dlatypov@google.com \
--cc=kunit-dev@googlegroups.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=skhan@linuxfoundation.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).