From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.kernel.org ([198.145.29.99]) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gKU2G-0001yL-KT for linux-um@lists.infradead.org; Wed, 07 Nov 2018 20:02:45 +0000 Subject: Re: [RFC v2 01/14] kunit: test: add KUnit test runner core References: <20181023235750.103146-1-brendanhiggins@google.com> <20181023235750.103146-2-brendanhiggins@google.com> <017b111f-d960-c1ef-46ae-eb0eb639fe5b@kernel.org> From: Shuah Khan Message-ID: <0149d343-937c-1a99-10ff-d2bcb546e49b@kernel.org> Date: Wed, 7 Nov 2018 13:02:29 -0700 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-um" Errors-To: linux-um-bounces+geert=linux-m68k.org@lists.infradead.org To: Brendan Higgins Cc: brakmo@fb.com, dri-devel@lists.freedesktop.org, linux-kselftest@vger.kernel.org, Shuah Khan , Rob Herring , linux-nvdimm@lists.01.org, richard@nod.at, kieran.bingham@ideasonboard.com, Joel Stanley , jdike@addtoit.com, Tim.Bird@sony.com, Kees Cook , linux-um@lists.infradead.org, rostedt@goodmis.org, Julia Lawall , dan.j.williams@intel.com, kunit-dev@googlegroups.com, Greg KH , Linux Kernel Mailing List , mcgrof@kernel.org, Daniel Vetter , mpe@ellerman.id.au, joe@perches.com, khilman@baylibre.com On 11/06/2018 06:28 PM, Brendan Higgins wrote: > On Fri, Nov 2, 2018 at 11:44 AM Shuah Khan wrote: >> >> On 10/23/2018 05:57 PM, Brendan Higgins wrote: > >>> + * Example: >>> + * >>> + * .. code-block:: c >>> + * >>> + * void add_test_basic(struct test *test) >>> + * { >>> + * TEST_EXPECT_EQ(test, 1, add(1, 0)); >>> + * TEST_EXPECT_EQ(test, 2, add(1, 1)); >>> + * TEST_EXPECT_EQ(test, 0, add(-1, 1)); >>> + * TEST_EXPECT_EQ(test, INT_MAX, add(0, INT_MAX)); >>> + * TEST_EXPECT_EQ(test, -1, add(INT_MAX, INT_MIN)); >>> + * } >>> + * >>> + * static struct test_case example_test_cases[] = { >>> + * TEST_CASE(add_test_basic), >>> + * {}, >>> + * }; >>> + * >>> + */ >>> +struct test_case { >>> + void (*run_case)(struct test *test); >>> + const char name[256]; >>> + >>> + /* private: internal use only. */ >>> + bool success; >>> +}; >>> + >> >> Introducing a prefix kunit_* might be a good idea for the API. >> This comment applies to the rest of patches as well. > > What about kunit_* instead of test_* and kmock_* instead of mock_*? > Does that seem reasonable? > kunit_* would work well. thanks, -- Shuah _______________________________________________ linux-um mailing list linux-um@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-um