Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5572imu; Wed, 7 Nov 2018 12:03:34 -0800 (PST) X-Google-Smtp-Source: AJdET5duMqNJjjnfce4UjbhVTbTcO+azYtRszQT3gRzKnsmKrrN5pj8W1caJFvdLUAz0n3KOwLzC X-Received: by 2002:a62:500c:: with SMTP id e12-v6mr1686233pfb.30.1541621013930; Wed, 07 Nov 2018 12:03:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541621013; cv=none; d=google.com; s=arc-20160816; b=ZoU6nd+KthUJFIr+bqwxk32Thhf49FzhRdIX01GdGgxtf9J9VebkvNPSHIjFioGAJA sUxr14C1c29BEDYij/4y1bCd+d/5JCYwWHHuryeHZ1SP3YSDk5JZSWAzKtkVeCBvmlZ3 Z+ZDZtCkIO+0Pvx+9Jq61dWOTmgqXO/eBtOCMkO5mgN5JxxFdsed8CRpEhKq9GuQXx1n nY4fZnT4vBivhomIsyrh2YBH8+FiP+j/e8/hCDr8/P4cnxJb4HSqG4NKUqduL9qXBJwR 97/bV5Z1Nwlp7WLYJg2B3dmYQM1BZG0fNzaSE6VHK5SZ5cCLUqdDG7URSNmGjDMA20Yk U0pA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature; bh=kGHczTB3pSJKE41xmQYVhUoRlNzmhCngMS11oUmj+fQ=; b=M/sRiC7nOe0mf5DxqAcGo/P+htILXGWHMvpjyuNZfZhcrEDV3wUh1SFvZUabWL6VHO Ka4ZEJAV+GBz5ZZ8iWFWLHuqCuVyVtP4mqFRfjYEzAGHJlYXrnk+sdPfDpTARH/r+Lnk f1JNT4aUvs7RN/T8vsWNzmZLZNgdY2IZlyX96hS4S1WlHdOZk95cp2WUUWuVbkQ2Wcry QlERdNKCLovzvWNPbVhhLS/iExymGxYNqhiK95Lu/eYbHcjeyHRFpMNFdr5t5voBk66b cMjm4QlQVZdtqUQJM1vTV1FLyE8IMfns91GUW8/QqnOe9Z/hKmcZLcUprKCXrND1RZzB oW6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bj3yar3P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i63si1401651pge.515.2018.11.07.12.03.11; Wed, 07 Nov 2018 12:03:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Bj3yar3P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726653AbeKHFeZ (ORCPT + 99 others); Thu, 8 Nov 2018 00:34:25 -0500 Received: from mail.kernel.org ([198.145.29.99]:53728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726027AbeKHFeZ (ORCPT ); Thu, 8 Nov 2018 00:34:25 -0500 Received: from [192.168.1.87] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 959EF20818; Wed, 7 Nov 2018 20:02:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1541620951; bh=wTMYW0KJzzpHR61jC1KnlLkuPTJ6PdggDIghMR/gkxw=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=Bj3yar3PEtsScDZ8o9zccTFwAtnWOdVNsPWDHah/25MuvEHYIwNt29qduaM1G/p/f Cn/uS/0WR6o2mziv4QM/c4YDr06bds8KqslxOFtuZAOO5AujzYxSU5YPjsXIsIb7QF +Y3QfqrZHMjlLNkumlhVl1rhMca/kBOvc1DNl+Rw= Subject: Re: [RFC v2 01/14] kunit: test: add KUnit test runner core To: Brendan Higgins Cc: Greg KH , Kees Cook , mcgrof@kernel.org, Joel Stanley , mpe@ellerman.id.au, joe@perches.com, brakmo@fb.com, rostedt@goodmis.org, Tim.Bird@sony.com, khilman@baylibre.com, Julia Lawall , linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Linux Kernel Mailing List , jdike@addtoit.com, richard@nod.at, linux-um@lists.infradead.org, Daniel Vetter , dri-devel@lists.freedesktop.org, Rob Herring , dan.j.williams@intel.com, linux-nvdimm@lists.01.org, kieran.bingham@ideasonboard.com, Shuah Khan 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 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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