From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: David Gow <davidgow@google.com>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
Linus Torvalds <torvalds@linux-foundation.org>,
Brendan Higgins <brendanhiggins@google.com>,
Daniel Latypov <dlatypov@google.com>,
linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
kunit-dev@googlegroups.com
Subject: Re: [PATCH 2/3] list: test: Add a test for list_is_head()
Date: Sat, 5 Feb 2022 15:06:34 +0200 [thread overview]
Message-ID: <Yf52WjnmA17wQ5p7@smile.fi.intel.com> (raw)
In-Reply-To: <20220205061539.273330-2-davidgow@google.com>
On Sat, Feb 05, 2022 at 02:15:37PM +0800, David Gow wrote:
> list_is_head() was added recently[1], and didn't have a KUnit test. The
> implementation is trivial, so it's not a particularly exciting test, but
> it'd be nice to get back to full coverage of the list functions.
>
> [1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/include/linux/list.h?id=0425473037db40d9e322631f2d4dc6ef51f97e88
...
> +static void list_test_list_is_head(struct kunit *test)
> +{
> + struct list_head a, b;
> +
> + KUNIT_EXPECT_TRUE(test, list_is_head(&a, &a));
OK.
> + KUNIT_EXPECT_FALSE(test, list_is_head(&a, &b));
Perhaps OK, but the main case here is to test an (arbitrary) member of the existing list.
> +}
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2022-02-05 13:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-05 6:15 [PATCH 1/3] list: test: Add test for list_del_init_careful() David Gow
2022-02-05 6:15 ` [PATCH 2/3] list: test: Add a test for list_is_head() David Gow
2022-02-05 13:06 ` Andy Shevchenko [this message]
2022-02-08 4:08 ` David Gow
2022-02-05 6:15 ` [PATCH 3/3] list: test: Add a test for list_entry_is_head() David Gow
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=Yf52WjnmA17wQ5p7@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 \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®