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=-14.3 required=3.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_IN_DEF_DKIM_WL autolearn=unavailable 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 ABF78C3A5A6 for ; Mon, 23 Sep 2019 09:05:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 740A321670 for ; Mon, 23 Sep 2019 09:05:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="NvXQgh6I" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2406435AbfIWJFP (ORCPT ); Mon, 23 Sep 2019 05:05:15 -0400 Received: from mail-pg1-f194.google.com ([209.85.215.194]:38709 "EHLO mail-pg1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729483AbfIWJFP (ORCPT ); Mon, 23 Sep 2019 05:05:15 -0400 Received: by mail-pg1-f194.google.com with SMTP id x10so7661846pgi.5 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=TPg3gA+LbiSJVA2esXVLL+mVl0XGI5+2Hb3WdbjJHj/p/LBt70l3smcq+L62Tq0hHC ukHdsE84Xf1Lytv1ZXBZYOkKP4WvA9ifBQ2DttaURcD62slPBBqEXOKVgIzxL24Q0Eyu Fm1PCIcblBpfbvvVp8U70mGCcmSoYI0cQPeWJ6Cxv9gPIgK88mZVvoHJQnTQnvbKFgF2 mi9gipVMpy4LzabPe7WfZEmxdrz6ixfJrAvFa+oJoUPUZEUemZQ2afK6OVBD/ncDZupW hslTXRbRWI9h7Txg0cMXSg9gsFlXmg/GZOoAMoUhyxdhpXl0OalBtJmiAZq+vQ0lAJlr oXhg== X-Gm-Message-State: APjAAAUD5HVXirDEJRb7UjuRWTBWS6jU7f/DMvmM4Pd3P9sGT2IFQT9x MJCCtWD4bq46KOIQerE7CrcBT6RbcvGgZlNSOIGizQ== 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 Cc: Frank Rowand , Greg KH , Josh Poimboeuf , Kees Cook , Kieran Bingham , Luis Chamberlain , Peter Zijlstra , Rob Herring , Stephen Boyd , shuah , "Theodore Ts'o" , Masahiro Yamada , devicetree , dri-devel , kunit-dev@googlegroups.com, "open list:DOCUMENTATION" , linux-fsdevel@vger.kernel.org, linux-kbuild , Linux Kernel Mailing List , "open list:KERNEL SELFTEST FRAMEWORK" , linux-nvdimm , linux-um@lists.infradead.org, Sasha Levin , "Bird, Timothy" , Amir Goldstein , Dan Carpenter , Daniel Vetter , Jeff Dike , Joel Stanley , Julia Lawall , Kevin Hilman , Knut Omang , Logan Gunthorpe , Michael Ellerman , Petr Mladek , Richard Weinberger , David Rientjes , Steven Rostedt , wfg@linux.intel.com, Linus Torvalds Content-Type: text/plain; charset="UTF-8" Sender: linux-kselftest-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org 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