From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3AEA4C3A5A6 for ; Mon, 23 Sep 2019 09:05:15 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0DC992196E for ; Mon, 23 Sep 2019 09:05:14 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="NvXQgh6I" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0DC992196E Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-nvdimm-bounces@lists.01.org Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id B82CC202EF294; Mon, 23 Sep 2019 02:07:46 -0700 (PDT) Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2607:f8b0:4864:20::542; helo=mail-pg1-x542.google.com; envelope-from=brendanhiggins@google.com; receiver=linux-nvdimm@lists.01.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 2E9BD202ECFC3 for ; Mon, 23 Sep 2019 02:07:46 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id z12so7649782pgp.9 for ; Mon, 23 Sep 2019 02:05:14 -0700 (PDT) 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=v8pa0Tk6FlMlkzD8bXA6NA6bMdvmrzwl4PAFIDbVMYM=; b=NvXQgh6IW3soN2kC6YtQSTm4nJDtjH7T1g1wwUk4J2MMTXgFeWqE4zDVwCvgvthfAE WGgMCY+3F8tX2ulk7a71LHHwNjjj6szslWqQDPwjwKZALkV5YkTouU1UbPdDScjYS1A3 tU4aEIFZK99BR3XOVeaN/cSOFn3rfi7yObVLV3PWs+NfL5qPlxMyeRQLXGH1oSX1DcR+ Y00Kq9GxGhG7rrAxC5FyQBB+KSDkFMah1k7qmSzRXBnClfBw0q/Abrxnd2xhD8r5qEtT Tri2HbzI2Jc1bPenj4gaZNMu/v3ap/CxdJdQ2lrX7Qpp+yqg86whqYHZk9TgPcLogoid i1DA== 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=v8pa0Tk6FlMlkzD8bXA6NA6bMdvmrzwl4PAFIDbVMYM=; b=gNzJO74drnAauB2/otKA03GCVk42DhFrSABrSZyWoPXhjt4SSJH2o6uIJmMLGt3R3p +xjODwIvFhPOO/V6C+gtg/XHqIZDN+nLBJME+VywHyy8kcKKqY3IGgDgjZKWHYSf3Nil RXMKykGm6UbEQtz/AI88JqiHW3D41I/cYm2dgzOVnMYNc7T/FzEW2zgI/H3u1uRqOkuY x6H6W8A0zqQyHyIB7BoFr4QUjzQEDF2WU81JOgr3llzbCzGj2rU1rh0mRHYR6P4frP7h bghobLDdVTMBvF8FF40kKIRD8oO4k7L85hjC+2m99HLRP1/3Vw+n4pC5rT6vZOdEzXT1 MsDw== X-Gm-Message-State: APjAAAUELhmm+VNaM+l9k3bvp+T0kKsjtSAehMe17NDsmOuA+iZnfLuD obwib/E9cZ824jRbohd56lnFvfe90Pa/Iy3lh+9Bkw== X-Google-Smtp-Source: APXvYqwcsKtiLcxSzZRbvj/9c2PAwvr8gZTaDk07lPhILKUwjb/s/yL4yzfAO84TT2ZemaVLn8TDzTeRlveY2nu9F6o= X-Received: by 2002:a17:90a:1746:: with SMTP id 6mr5388129pjm.117.1569229513429; Mon, 23 Sep 2019 02:05:13 -0700 (PDT) MIME-Version: 1.0 References: <20190921001855.200947-1-brendanhiggins@google.com> <20190921001855.200947-8-brendanhiggins@google.com> <944ac47d-1411-9ebd-d0d4-a616c88c9c20@infradead.org> In-Reply-To: <944ac47d-1411-9ebd-d0d4-a616c88c9c20@infradead.org> From: Brendan Higgins Date: Mon, 23 Sep 2019 02:05:02 -0700 Message-ID: Subject: Re: [PATCH v17 07/19] kunit: test: add initial tests To: Randy Dunlap X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Petr Mladek , "open list:DOCUMENTATION" , Peter Zijlstra , Amir Goldstein , dri-devel , Sasha Levin , Masahiro Yamada , Michael Ellerman , "open list:KERNEL SELFTEST FRAMEWORK" , shuah , Rob Herring , linux-nvdimm , Frank Rowand , Knut Omang , Kieran Bingham , Linus Torvalds , wfg@linux.intel.com, Joel Stanley , David Rientjes , Jeff Dike , Dan Carpenter , devicetree , linux-kbuild , "Bird, Timothy" , linux-um@lists.infradead.org, Steven Rostedt , Julia Lawall , Josh Poimboeuf , kunit-dev@googlegroups.com, Theodore Ts'o , Richard Weinberger , Stephen Boyd , Greg KH , Linux Kernel Mailing List , Luis Chamberlain , Daniel Vetter , Kees Cook , linux-fsdevel@vger.kernel.org, Kevin Hilman Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" On Sun, Sep 22, 2019 at 9:28 AM Randy Dunlap wrote: > > On 9/20/19 5:18 PM, Brendan Higgins wrote: > > Add a test for string stream along with a simpler example. > > > > Signed-off-by: Brendan Higgins > > Reviewed-by: Greg Kroah-Hartman > > Reviewed-by: Logan Gunthorpe > > Reviewed-by: Stephen Boyd > > --- > > lib/kunit/Kconfig | 25 ++++++++++ > > lib/kunit/Makefile | 4 ++ > > lib/kunit/example-test.c | 88 ++++++++++++++++++++++++++++++++++ > > lib/kunit/string-stream-test.c | 52 ++++++++++++++++++++ > > 4 files changed, 169 insertions(+) > > create mode 100644 lib/kunit/example-test.c > > create mode 100644 lib/kunit/string-stream-test.c > > > > diff --git a/lib/kunit/Kconfig b/lib/kunit/Kconfig > > index 666b9cb67a74..3868c226cf31 100644 > > --- a/lib/kunit/Kconfig > > +++ b/lib/kunit/Kconfig > > @@ -11,3 +11,28 @@ menuconfig KUNIT > > special hardware when using UML. Can also be used on most other > > architectures. For more information, please see > > Documentation/dev-tools/kunit/. > > + > > +if KUNIT > > The 'if' above provides the dependency clause, so the 2 'depends on KUNIT' > below are not needed. They are redundant. Thanks for catching that. I fixed it in the new revision I just sent out. > > + > > +config KUNIT_TEST > > + bool "KUnit test for KUnit" > > + depends on KUNIT > > + help > > + Enables the unit tests for the KUnit test framework. These tests test > > + the KUnit test framework itself; the tests are both written using > > + KUnit and test KUnit. This option should only be enabled for testing > > + purposes by developers interested in testing that KUnit works as > > + expected. > > + > > +config KUNIT_EXAMPLE_TEST > > + bool "Example test for KUnit" > > + depends on KUNIT > > + help > > + Enables an example unit test that illustrates some of the basic > > + features of KUnit. This test only exists to help new users understand > > + what KUnit is and how it is used. Please refer to the example test > > + itself, lib/kunit/example-test.c, for more information. This option > > + is intended for curious hackers who would like to understand how to > > + use KUnit for kernel development. > > + > > +endif # KUNIT Cheers _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm