Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp758658pxu; Thu, 15 Oct 2020 16:10:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHHbpKFp5ZPq6KVW1Vzpf/Vcrnx+/hRg5t0jqT72dEAvQiWGYpwsqWjFlhoQMcMU87u4RJ X-Received: by 2002:a17:906:9389:: with SMTP id l9mr785233ejx.462.1602803434727; Thu, 15 Oct 2020 16:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602803434; cv=none; d=google.com; s=arc-20160816; b=vA15C2DtrIvs9FhCE/Zeg34tDTrU02CwN12tNIcp4GaUfYp4L3Pcv9/Q0/qo8UWCTc JLegXDguM4oTFnCzfmmkr4WRypmpZw5bZX2sQTx//gxQ28R/7pr9daTGKL42gAByVXJ9 LLK9bJ1ECtm7X923QY5HWkRZNmncd7wnuP7W8ZBTjVSAvUwH1WDOHvJ8ArY8oK4Es/+5 YSGGQy5MnO5fJJXwoLxcm4AGZuuXlGw5//IqZsvWdQUA9+ipdjNnuDS/RQyfs+WF2U+O 7zNYG7Ac3WsqQLaIiuXy7doZeTTAfttXrpvP5sjnhgrcUmJkFoWj7BBTli8WHSpiAR8g /zdA== 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=4B6oPRn/lN9ZEw1b/lAKDruSd9OH4Vj2iTAydCXD6UA=; b=qvge9Z8ccN0meuhLl3bl4YQKoAPTkpUrBwCPmvykAzE960n1bp1gcBEXx2TxGBDrJ+ fzYlcJkX6UxWwlULHRIcJp/0di/V9hmd3A3bfhJozKKh9XMGv8ckwo2quiKbM3zvKBrc d9CzUosI/3CzJb/kpYbEA1/8w5T+ZjboSCc45UBLfWbFes3Fa6YzrbBT+6U1XVJdD+wh tZNl3O+22YVdFy7cLJxlsuvxfjyGPzNwIdhFZS+EbPlymQkW1eZycLh/f8rc9UwDLBk3 R2I8F0wrFUmL/msfchPcWETH4UgQ7lzIVXTVcsS1QUsFm74o/tw/Vd8vCWWLsVHBZIh9 PuzA== 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 m4si313412edv.101.2020.10.15.16.10.11; Thu, 15 Oct 2020 16:10:34 -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 S1732913AbgJOSUZ (ORCPT + 99 others); Thu, 15 Oct 2020 14:20:25 -0400 Received: from mga05.intel.com ([192.55.52.43]:48388 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726053AbgJOSUZ (ORCPT ); Thu, 15 Oct 2020 14:20:25 -0400 IronPort-SDR: IJd/IGJdVyc0NJJEaEfFjdiIj3w28lKoBewsjV8GBhvnjogRfd4XQBE6fZY6HNAGZm9SUd5qmu u6qWKCISSu2Q== X-IronPort-AV: E=McAfee;i="6000,8403,9775"; a="251113962" X-IronPort-AV: E=Sophos;i="5.77,379,1596524400"; d="scan'208";a="251113962" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 11:20:24 -0700 IronPort-SDR: N+XsIxCCvkcJrrAhXjlmFzTR52ShJSS3OF9fITkegmLlreG53Hu3/JK9r92Vrj+deoxG3todXb yO8O4Cf1cVsw== X-IronPort-AV: E=Sophos;i="5.77,379,1596524400"; d="scan'208";a="314606940" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Oct 2020 11:20:19 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kT7sP-007cvN-7w; Thu, 15 Oct 2020 21:21:21 +0300 Date: Thu, 15 Oct 2020 21:21:21 +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: <20201015182121.GZ4077@smile.fi.intel.com> References: <20201015014616.309000-1-vitor@massaru.org> <20201015174823.GY4077@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 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) -- With Best Regards, Andy Shevchenko