Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1176429ybp; Wed, 9 Oct 2019 09:54:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqzLL/5UihTBzIA+ZCxebcZ1auq90dZZvPkf/Nh0hnwhsSz+xlD/2SjEBfUpYOdreXPOkrKC X-Received: by 2002:aa7:ca52:: with SMTP id j18mr3839431edt.299.1570640074043; Wed, 09 Oct 2019 09:54:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570640074; cv=none; d=google.com; s=arc-20160816; b=mm0zhiMWl8OVxcy4+nps1aCFrLZ4Q7VAnLZU6UXZlsgbLAGSeYTBX75Egx3h+5KiAp EcRWFWVjlAc4KM9PmF4Nismf4Wp3pQyOXCgfK+tS2REAu7NEK+Jn/8t1/3dJ+hFsw20K KqwpkCU0tIDfeiD/YqgVD/Agdlot0uH78V/+laQRjObxbGhoeq/dv+NOIEE1GybueTxR +V6UyIAPHCVslHxirvv29qA0MXTvq2E9xXAHczaqjssD9dZgBbnvv41hPwnh+E19Wytt mILM7zcuGiDHVdnu0yGfJlExmmZy4yG7HNXyTvfcGnrNRpT5WMFw5cufhWk/3wF+XdyR Dh3A== 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:message-id:subject:cc :to:from:date; bh=OZXjo3QaUm1NRleC5tigcd1O5QwGc0TCLFuqR/AuIFk=; b=ItEilxOt4hRQ4mQD6BjlNIoh6+xnIkNs6EOTHNFx/E5oz4kOmMZsT01QTGTvNRAgUi zVhWTCdjW3U4KXcYRPhKL627LMnKqA/u9j6alPOIXkifzdFKJgOKo/jrgJArNk2g6PoP TLySAB8GRjf5Xent3ELBCMa0pcPISklojhHGI03lYCAGwnvJoPJWQwS4+kS+Ch4fiydl qnKijyg04ZZP8YR6aY+U2/2ItlSw4w61pEyRnOGwf/WDy8xkOqY8W2PldVNRaImbu4CX 90FUxXlbxqwNdAmtahgUf5gdfLST+hgUM5YkL8mByPmOotHRTLn4a05+rXHKyWKV3Iw5 MfEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-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 r17si1640055edx.257.2019.10.09.09.54.09; Wed, 09 Oct 2019 09:54:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731417AbfJIQyD (ORCPT + 99 others); Wed, 9 Oct 2019 12:54:03 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:52416 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1730490AbfJIQyC (ORCPT ); Wed, 9 Oct 2019 12:54:02 -0400 Received: from callcc.thunk.org (guestnat-104-132-34-105.corp.google.com [104.132.34.105] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x99Grrwb017647 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 9 Oct 2019 12:53:53 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 05E5542045A; Wed, 9 Oct 2019 12:53:52 -0400 (EDT) Date: Wed, 9 Oct 2019 12:53:52 -0400 From: "Theodore Y. Ts'o" To: Iurii Zaikin Cc: "open list:KERNEL SELFTEST FRAMEWORK" , linux-ext4@vger.kernel.org, skhan@linuxfoundation.org, adilger.kernel@dilger.ca, kunit-dev@googlegroups.com, Brendan Higgins Subject: Re: [PATCH v1] fs/ext4/inode-test: KUnit test for ext4 inode. Message-ID: <20191009165352.GA13279@mit.edu> References: 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-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Tue, Oct 08, 2019 at 07:42:05PM -0700, Iurii Zaikin wrote: > Note: this patch is intended to be applied against kselftest/test branch: > https://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest.git/log/?h=test > > KUnit tests for decoding extended 64 bit timestamps. I'd suggest using "ext4: add kunit test for decoding extended timestamps" as the one-line summary, and we probably don't need anything else. > Signed-off-by: Iurii Zaikin > --- > fs/ext4/Kconfig | 12 +++ > fs/ext4/Makefile | 1 + > fs/ext4/inode-test.c | 217 +++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 230 insertions(+) > create mode 100644 fs/ext4/inode-test.c > > diff --git a/fs/ext4/Kconfig b/fs/ext4/Kconfig > index cbb5ca830e57..72c26abbce4c 100644 > --- a/fs/ext4/Kconfig > +++ b/fs/ext4/Kconfig > @@ -106,3 +106,15 @@ config EXT4_DEBUG > If you select Y here, then you will be able to turn on debugging > with a command such as: > echo 1 > /sys/module/ext4/parameters/mballoc_debug > + > +config EXT4_INODE_KUNIT_TEST > + bool "KUnit test for ext4 inode" > + depends on EXT4_FS > + depends on KUNIT > + help > + This builds the ext4 inode sysctl unit test, which runs on boot. > + Tests the encoding correctness of ext4 inode. > + For more information on KUnit and unit tests in general please refer > + to the KUnit documentation in Documentation/dev-tools/kunit/. Should we perhaps just call the cofnig "EXT4_KUNIT_TESTS"? Right now the only thing we test is timestamp encoding/decoding, but later on we'll be adding other other ext4 uninit tests --- and more ext4 encoding tests is not neceesarily where I would start, since the rest are actually quite straightforward. (The next set of uninit tests I'm interested in is the ext4's extent_status tree, since that requires minimal amounts of test mocks.) So we might as well make the config name more general to begin with. - Ted