Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp199855yba; Wed, 8 May 2019 19:01:27 -0700 (PDT) X-Google-Smtp-Source: APXvYqxwN/0JpKs+jqVs14UT4pRYMKFuVcxL76ydbpwDY7bSH1ud2GvAQAzZH7bXp4h7Q5K+uL7S X-Received: by 2002:a17:902:720a:: with SMTP id ba10mr1626973plb.192.1557367287820; Wed, 08 May 2019 19:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557367287; cv=none; d=google.com; s=arc-20160816; b=0pO2UsoqXpyX1Teo6xZ0hOy/zzehYrMlyX0xafjjR+IoSDKZpF4HtIAnJK/kKTD9g+ JNcMZMpjREpB4f+bpqfFYiZf+7C75mf06Igh5BKVEZrwvoliDic9eMbVTcAi6qemfMl4 QQIONu6DL6RClG93O9cLTToXdVLpjJSVZ0mWeJTwcVT4lknk4bG5HM50ITVZBJQERUrz 8V3rvjeR0tHF84EAcoEhxb88AayOwuTWC5QbWEsIjmQb2XGqIBtoKdcFnog251wN/BWE 0xVKNWvqFpZg4XwRWc/rva6Lrrf0c9LBE9PqIaCa3/KWZB2ZV8y1AySVr2kNeGDor8np xR1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:mail-followup-to :message-id:subject:cc:to:from:date; bh=Kvd+SbJ68UZk+V/+2nzXR9wr4+GWFqNWZYEH33Yfu4U=; b=0eCzRwyRYRaNHBT8sRzFyvCrIggLZikXFJ6zXHTcdiI0PX3kAePHY6AmAfwmKTg+xz 5/qNbX5NyWl4dwTio287WZ/UnYChDMQ4NXDDRf8Avadyo6Gc0XwjepaONBioAIjV+mMn DoZfNDOvGy6doUpfkl4DU2HNUzvi4hnrUwm+wC8nKgbhezYY0fK1Gq0Dyno7Fxkx0F14 YB4/aPK77ko2GYBUEvwe2sbiMev8DqN71xUoC8QxzOEEPxtMf9f03ayvrsbUCOyVWZt0 kNV/LJ4kewjufUFwM88RG04apJ1y6xIxPjHSWX6u0cIW/qwtFI4864yMwGe7igIAKrkT c8IQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6si941282pga.251.2019.05.08.19.01.09; Wed, 08 May 2019 19:01:27 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726561AbfEICAN (ORCPT + 99 others); Wed, 8 May 2019 22:00:13 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:46167 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726109AbfEICAM (ORCPT ); Wed, 8 May 2019 22:00:12 -0400 Received: from callcc.thunk.org ([66.31.38.53]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x491wvb2023686 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 8 May 2019 21:58:57 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id D504A420024; Wed, 8 May 2019 21:58:56 -0400 (EDT) Date: Wed, 8 May 2019 21:58:56 -0400 From: "Theodore Ts'o" To: Frank Rowand Cc: Greg KH , Brendan Higgins , keescook@google.com, kieran.bingham@ideasonboard.com, mcgrof@kernel.org, robh@kernel.org, sboyd@kernel.org, shuah@kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-um@lists.infradead.org, Alexander.Levin@microsoft.com, Tim.Bird@sony.com, amir73il@gmail.com, dan.carpenter@oracle.com, dan.j.williams@intel.com, daniel@ffwll.ch, jdike@addtoit.com, joel@jms.id.au, julia.lawall@lip6.fr, khilman@baylibre.com, knut.omang@oracle.com, logang@deltatee.com, mpe@ellerman.id.au, pmladek@suse.com, richard@nod.at, rientjes@google.com, rostedt@goodmis.org, wfg@linux.intel.com Subject: Re: [PATCH v2 00/17] kunit: introduce KUnit, the Linux kernel unit testing framework Message-ID: <20190509015856.GB7031@mit.edu> Mail-Followup-To: Theodore Ts'o , Frank Rowand , Greg KH , Brendan Higgins , keescook@google.com, kieran.bingham@ideasonboard.com, mcgrof@kernel.org, robh@kernel.org, sboyd@kernel.org, shuah@kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, kunit-dev@googlegroups.com, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-nvdimm@lists.01.org, linux-um@lists.infradead.org, Alexander.Levin@microsoft.com, Tim.Bird@sony.com, amir73il@gmail.com, dan.carpenter@oracle.com, dan.j.williams@intel.com, daniel@ffwll.ch, jdike@addtoit.com, joel@jms.id.au, julia.lawall@lip6.fr, khilman@baylibre.com, knut.omang@oracle.com, logang@deltatee.com, mpe@ellerman.id.au, pmladek@suse.com, richard@nod.at, rientjes@google.com, rostedt@goodmis.org, wfg@linux.intel.com References: <20190501230126.229218-1-brendanhiggins@google.com> <54940124-50df-16ec-1a32-ad794ee05da7@gmail.com> <20190507080119.GB28121@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 08, 2019 at 05:43:35PM -0700, Frank Rowand wrote: > kselftest provides a mechanism for in-kernel tests via modules. For > example, see: > > tools/testing/selftests/vm/run_vmtests invokes: > tools/testing/selftests/vm/test_vmalloc.sh > loads module: > test_vmalloc > (which is built from lib/test_vmalloc.c if CONFIG_TEST_VMALLOC) The majority of the kselftests are implemented as userspace programs. You *can* run in-kernel test using modules; but there is no framework for the in-kernel code found in the test modules, which means each of the in-kernel code has to create their own in-kernel test infrastructure. That's much like saying you can use vice grips to turn a nut or bolt-head. You *can*, but it might be that using a monkey wrench would be a much better tool that is much easier. What would you say to a wood worker objecting that a toolbox should contain a monkey wrench because he already knows how to use vise grips, and his tiny brain shouldn't be forced to learn how to use a wrench when he knows how to use a vise grip, which is a perfectly good tool? If you want to use vice grips as a hammer, screwdriver, monkey wrench, etc. there's nothing stopping you from doing that. But it's not fair to object to other people who might want to use better tools. The reality is that we have a lot of testing tools. It's not just kselftests. There is xfstests for file system code, blktests for block layer tests, etc. We use the right tool for the right job. - Ted