Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp714414pxu; Thu, 15 Oct 2020 14:49:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzCiYW52L/3DOQMoCcJWWAzFZMHcpvYnDQ2IMcsrM/P5dcj2hiBB+FzQhKUMHGZR7/dvW6E X-Received: by 2002:a50:d5d8:: with SMTP id g24mr517564edj.119.1602798553390; Thu, 15 Oct 2020 14:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602798553; cv=none; d=google.com; s=arc-20160816; b=ugtw8K6qzEcR8BjMJDB7qzSlIHmZXzwZ/t4bqF0rcZObCqyXX5hlcPNwPnn0qm8uSC GS+ItkrPSuaYLYp+v4WWls7lfF5T8sxre3w/csmuk5fAxhn/xO4fb1uKm6PfV86ocPuH biAqkINnAfIdqYShNI4VzVb9C33+pDcGbUGLOHrwohw5hhnYOE5lcevLVDyCW7ZmiG7p AS7Fn1K8TXwSXcxbaPACK+3itR1tjM+y7Y+prByhCF3yAO23J1cVvIPOceVuNxnTCUwt P/zuB82lz2ZY1Mp1VYbTX9saAUKfyQhiKvEmSThgfyKx++DE2emptDKhqRxatHpV8Q3S /Olg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:organization:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :ironport-sdr:ironport-sdr; bh=fVflPksTGg6xKntb+/iMLVGBwJOHQ+zkTl2GWV7UeP0=; b=0lmIBNLdu3yIRI24ViU65X9Expcq/E5SQNwWi/hrLX39FG3ZXRew+j2Ea7QVW5gdXg x48ojuQRL7fMBOLQuPhtC9VQOMG0tan9EehEANChgosnIokMPaTJb97tvPY3uiEs66C5 rNUMALI24qQVc2KT2RYAYmJZuBkxaBaYF5oOD3tMANfbEwTJ9kfpZIZb0y1eWJ8v75ae MGyQrLZu5cGVYXTRWtHqKH7pfmy2u/y+aS38RTT0rungfRNvSU7L4wBDEpgpIWPBSjqH s/dd1kJDMkpGA+fP4kUvFYk/aCwSqusP1iA30yqYdOdaCvs7SftU+RO0DzeMR7UYTVN3 tv6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bt23si225943ejb.147.2020.10.15.14.48.51; Thu, 15 Oct 2020 14:49:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729615AbgJOSWb (ORCPT + 99 others); Thu, 15 Oct 2020 14:22:31 -0400 Received: from mga18.intel.com ([134.134.136.126]:15889 "EHLO mga18.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725955AbgJOSWb (ORCPT ); Thu, 15 Oct 2020 14:22:31 -0400 IronPort-SDR: g6db8tmLVNsA3WguSQbz1OaIiqLuG9+oAKN4lNVG2cU1NgneeezaaBTlApLUmFCy+g55NEcu3b p8AQjnw53t+A== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="154245935" X-IronPort-AV: E=Sophos;i="5.77,379,1596524400"; d="scan'208";a="154245935" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 11:22:30 -0700 IronPort-SDR: r1XJlOIB6GjyjRP48YPoOq+HgmYrTrhpKoPNzRrPd0zwFUbHWNsgKJ7S2tMqjeVk5thVRFqjzL 0Qi5UeA0AOfg== X-IronPort-AV: E=Sophos;i="5.77,379,1596524400"; d="scan'208";a="521941691" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by fmsmga005-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 11:22:25 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kT7uR-007d0I-CY; Thu, 15 Oct 2020 21:23:27 +0300 Date: Thu, 15 Oct 2020 21:23:27 +0300 From: Andy Shevchenko To: Vitor Massaru Iha Cc: KUnit Development , Brendan Higgins , Marco Elver , "open list:KERNEL SELFTEST FRAMEWORK" , Linux Kernel Mailing List , Shuah Khan , linux-kernel-mentees@lists.linuxfoundation.org, Greg Kroah-Hartman , tglx@linutronix.de, geert@linux-m68k.org, paul.gortmaker@windriver.com, akpm@linux-foundation.org, torvalds@linux-foundation.org, arnd@arndb.de, elfring@users.sourceforge.net, mhocko@suse.com Subject: Re: [PATCH v2] lib: kunit: add list_sort test conversion to KUnit Message-ID: <20201015182327.GA4077@smile.fi.intel.com> References: <20201015014616.309000-1-vitor@massaru.org> <20201015174823.GY4077@smile.fi.intel.com> <20201015182121.GZ4077@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201015182121.GZ4077@smile.fi.intel.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 15, 2020 at 09:21:21PM +0300, Andy Shevchenko wrote: > On Thu, Oct 15, 2020 at 02:59:05PM -0300, Vitor Massaru Iha wrote: > > On Thu, Oct 15, 2020 at 2:47 PM Andy Shevchenko > > wrote: > > > > > > On Wed, Oct 14, 2020 at 10:46:16PM -0300, Vitor Massaru Iha wrote: > > > > This adds the conversion of the runtime tests of test_list_sort, > > > > from `lib/test_list_sort.c` to KUnit tests. > > > > > > > rename lib/{test_list_sort.c => list_sort_kunit.c} (62%) > > > > > > One more thing. The documentation [1] doesn't specify any name conventions. > > > So, please leave file name untouched. > > > > > > [1]: https://www.kernel.org/doc/html/latest/dev-tools/kunit/index.html > > > > This convention hasn't yet entered the Torvaldos tree, but it is in > > the Shuah tree: [1] > > > > +Test File and Module Names > > +========================== > > + > > +KUnit tests can often be compiled as a module. These modules should be named > > +after the test suite, followed by ``_test``. If this is likely to conflict with > > +non-KUnit tests, the suffix ``_kunit`` can also be used. > > + > > +The easiest way of achieving this is to name the file containing the test suite > > +``_test.c`` (or, as above, ``_kunit.c``). This file should be > > +placed next to the code under test. > > + > > +If the suite name contains some or all of the name of the test's parent > > +directory, it may make sense to modify the source filename to reduce > > redundancy. > > +For example, a ``foo_firmware`` suite could be in the ``foo/firmware_test.c`` > > +file. > > > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/commit/?h=kunit&id=2a41fc52c21b6ece49921716bd289bfebaadcc04 > > I see. > > Can the rest of documentation be consistent with this? It seems half-baked, > since examples show something different. > > (Entire documentation if full of example-test.c) Also it doesn't really clear about the test cases against header files, like for list.h or bits.h. (There is no c-file and I'm not sure one desires to have include/linux/*_kunit.c) -- With Best Regards, Andy Shevchenko