Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2576863imu; Tue, 6 Nov 2018 17:47:54 -0800 (PST) X-Google-Smtp-Source: AJdET5chVQdO8B83KoU/jpX5xHaNl8GqWTC49IeVhHc0rmpSqo9GbkiJM48ruubaGmT+FWkrhyBq X-Received: by 2002:a62:8e0a:: with SMTP id k10-v6mr29401171pfe.182.1541555274755; Tue, 06 Nov 2018 17:47:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541555274; cv=none; d=google.com; s=arc-20160816; b=Zh4fHuSv0Wv/sKlBOwTwYVe6FqzxNBZxf/2m8gBXg91wX3CU5fFLRst3Va3csxYCRz jKDc0NsTBi54L7mVH2qGfuhJFm4CSNHscGkyuL2Ta6ksoJMZnGKANCgjA/EczGbHndwV vd7OwPqpXodhW8s5Vm0cL9EmyrjSvaLIT1TjkqDxFXfe4lc1DqCKFjrFW3i0x2ixfD77 c7837soXXX0k2wnMkNv0IpvAvK1EFFEz1IT58GYUNBIHzkt5+94HYHxZ9actZVm7dYGK 1diju0KtcWh0l/TAxHJ0wnnRk4GctBCjfsY0sDkQEqcmKtqEk5tbDCZgMk92mbfdRT54 Tdyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=JlNlVxe5Ty/jfNcPeaLPX3rUnKgotdYEk6vhAA+mPls=; b=oa1DDmntdGqqVlNawzwdP3XHd12zcDHf0o031c2JmYCYQNUoSnn8EeGuwYRqTJq1eG 7o7oB/UZdBI31a6E3Vb3GUQgWvp4taVW4QGuoCXTBDaSheEUuoBnHD4aJa85TJquZW7t nmEgNMmLifdMUoeUwn4NpM5w6vlYwIzx7kCed/ds6IraDK9Ac4GDnXnUn31QzxZ4ZFaQ LJauqUrtO/4JE8nH+VS7/LMaHsRbIVSrVU29A4NOQbozhgLciTIxgq0mT5+XHXbBIh0O vdib12kK8BEwEdknEjBN2hLjFrLCPTZAD0MRZsojS5UaV9i0CzCO5yQpP0YoP4avB7K4 xGCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=eViEMRS+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 1-v6si44471732plp.114.2018.11.06.17.47.39; Tue, 06 Nov 2018 17:47:54 -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=@google.com header.s=20161025 header.b=eViEMRS+; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731050AbeKGK5C (ORCPT + 99 others); Wed, 7 Nov 2018 05:57:02 -0500 Received: from mail-ot1-f51.google.com ([209.85.210.51]:43184 "EHLO mail-ot1-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731011AbeKGK5B (ORCPT ); Wed, 7 Nov 2018 05:57:01 -0500 Received: by mail-ot1-f51.google.com with SMTP id k9so13356628otl.10 for ; Tue, 06 Nov 2018 17:28:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JlNlVxe5Ty/jfNcPeaLPX3rUnKgotdYEk6vhAA+mPls=; b=eViEMRS+Q89tAWNlKtzCoIt+JTaqVt6rnSgwCj8v0xYE6PBUCFk1Mqflimz2myldMx zKMTqJNErAVNi9BOs32B6ROIShGdAY0QdDjAgCdThAPUlPIy7juFNaor2Iit3D6WmoM6 4piEMQUmWD1oVbZ2gvn16AxcvpT8i8SPWLuj8YAPmA3i0jRZud4/Q+p8B+57+SHYzee+ eJqrTdd5JXMUrFlWCP5AxxnRTE3Uo24UIU0vntf9Nxt5V6FU8wFUUAZ6vOdrgH6RPSJF GXioj2y3sHNZHhmyZ96BsIwRp4/s2KYdHUJuUA0xUXv1eh/AbjOCjSfTZRycpJZ83HOR Pq9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JlNlVxe5Ty/jfNcPeaLPX3rUnKgotdYEk6vhAA+mPls=; b=l+Q1vM6c02tMWjEnG+fhNClchPux3yJFmvN/0OuWlOPo4jBEWL9QKhOGS+kqoSNaDx txwwPakwv6ONVrDCKPmGsWaLzCv+BqbQS+icKeCE5Akg4mRCukIPZnvBYe7VH+60TH3w bY38CSWzNDBJNP6ZlmVHtoVgeA4d3qTb6PCa5SiLkoSCvMI/aAI01u4p9PkewWXjJlWb crBzcgYcZqc6BSCIfXaRGePY/OmuFQs5Rnnh6mh5srE7IPBnL/yIerMHMpgIMAL0qgdw jKrXO7fmwRXuvep96jVCvZQA9D/y11MI4GR3Ql+E6PnqnB+oRL32pTE01vt6yqGEwKLd +ixg== X-Gm-Message-State: AGRZ1gIywj3uD5fwjaZfLxb7nbpGN21JpFnQisP/eVNjYfmNhYxtK95p EMZCSUE0NqMhGOrqwL010W+LbNvQxF6nBS4oTJ2fvQ== X-Received: by 2002:a9d:654c:: with SMTP id q12mr11256028otl.338.1541554134295; Tue, 06 Nov 2018 17:28:54 -0800 (PST) MIME-Version: 1.0 References: <20181023235750.103146-1-brendanhiggins@google.com> <20181023235750.103146-2-brendanhiggins@google.com> <017b111f-d960-c1ef-46ae-eb0eb639fe5b@kernel.org> In-Reply-To: <017b111f-d960-c1ef-46ae-eb0eb639fe5b@kernel.org> From: Brendan Higgins Date: Tue, 6 Nov 2018 17:28:43 -0800 Message-ID: Subject: Re: [RFC v2 01/14] kunit: test: add KUnit test runner core To: shuah@kernel.org 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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?