Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp4288120pxu; Tue, 20 Oct 2020 13:01:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxFUgx69mtGVr4E3UhbflRtD7oQ0lc5fWIpz9+hj0SotXnoElHW5LqiGaRNHXdwVGDv5OPh X-Received: by 2002:a17:906:82ce:: with SMTP id a14mr4933430ejy.84.1603224062267; Tue, 20 Oct 2020 13:01:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603224062; cv=none; d=google.com; s=arc-20160816; b=FtZjvxGsHH48my/NLpJHVDoCDDPHvPsfu2hmKbEy1uwqCdyxkrSO47f0+EM0r2XXQ/ k9pfl9qY3Ix5UHGAuLfUE15ojVoLsHpDCPMwjCXTVt6GzK9u1TS+jB1+lfHXzzRS1lZ2 vmRbii39KFaAzGRR74jsnpWJmRVPqm3oAbNpBRc95jdMcphCNLIyql7QbrOSenNkdVj0 rCp2IRsxpufR3xmA3CUcYzj97yMUaf2R6KIx+F0hcps2KD8ZWBTRySZ/3B8HGLrKcro2 IPK99bTzgoY4Yo+v+0v1MhzFleSUJ2xRfVnH3ovWW6fV6rhKN8V+9jYaS/IR/2l9o1RX g1eA== 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=Acp7uopg68JcojpimTT4lQ771ffILtJDQRaXTG5tYSY=; b=jjrA+wXzmJCkP5IXT5eLjbYMBefggO13G7mDCDRaxaMW1t14zqhyVocs7PNgqKRQE7 HCqBwLRxhnIQms7GlU8I/N0f4NyON5LscGqfep6FRknilE+khoqf2twJiEDXIFaLND/r 75bMQHZ4TR7FqrxzTXG+aqX6hFtTR8JboYuAelMXx6eL4gXPmG8E24GoQ+VJTrm1GS9/ QhjKNwjqRPps43IiEQPOIzgq7YkEJxpcMsvvxNaXK6X/Qg5SarA8kg5EW5kAvbOHbGcL /JO8zXw5V7u2Zwt4eukaJYIJBdTc2FNix/4M46njHQTonWizhDEwTS3XAXNp0n+NzmYN ESPw== 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 cn6si1887344edb.428.2020.10.20.13.00.39; Tue, 20 Oct 2020 13:01:02 -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 S2387443AbgJTIIp (ORCPT + 99 others); Tue, 20 Oct 2020 04:08:45 -0400 Received: from mga04.intel.com ([192.55.52.120]:28580 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727761AbgJTIIm (ORCPT ); Tue, 20 Oct 2020 04:08:42 -0400 IronPort-SDR: FKg5ojdE59EwWR4Yb7ofH7SQoSyPQXrPcof6D1I88vRIbuYFU8UzRZrOuq7uGRkDR0v0qQKpEb ykEzH5JegmjA== X-IronPort-AV: E=McAfee;i="6000,8403,9779"; a="164562994" X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="164562994" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Oct 2020 01:08:42 -0700 IronPort-SDR: fi4SDY4KZtt7W2/BqYzzEnZn9S/MCUh+oO49ItV0Bq3+40Vn4cWi5agurP4DDcGN7kBoGD9JFw owWP7wAvoTOA== X-IronPort-AV: E=Sophos;i="5.77,396,1596524400"; d="scan'208";a="523420990" 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; 20 Oct 2020 01:08:40 -0700 Received: from andy by smile with local (Exim 4.94) (envelope-from ) id 1kUmiF-00BHRg-Dx; Tue, 20 Oct 2020 11:09:43 +0300 Date: Tue, 20 Oct 2020 11:09:43 +0300 From: Andy Shevchenko To: Daniel Latypov Cc: brendanhiggins@google.com, davidgow@google.com, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, skhan@linuxfoundation.org Subject: Re: [PATCH] lib: add basic KUnit test for lib/math Message-ID: <20201020080943.GY4077@smile.fi.intel.com> References: <20201019224556.3536790-1-dlatypov@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20201019224556.3536790-1-dlatypov@google.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 Mon, Oct 19, 2020 at 03:45:56PM -0700, Daniel Latypov wrote: > Add basic test coverage for files that don't require any config options: > * gcd.c > * lcm.c > * int_sqrt.c > * reciprocal_div.c > (Ignored int_pow.c since it's a simple textbook algorithm.) > > These tests aren't particularly interesting, but > * they're chosen as easy to understand examples of how to write tests > * provides a place to add tests for any new files in this dir > * written so adding new test cases to cover edge cases should be easy Is documentation not enough? I have recently wrote my first KUnit test and I found documentation pretty good for the start. I think we actually need more complex examples in the code (and useful). So, I'm in doubt these test are a good point to start with. -- With Best Regards, Andy Shevchenko