Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C53481CFB6 for ; Thu, 2 Nov 2023 19:12:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="hAJAgFuK" Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9578312D for ; Thu, 2 Nov 2023 12:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=bXPoHY2tfJWC+khL7GINAlNeBBCsV4H0zp+4/vB8yb4=; b=hAJAgFuKIBd6QNZys72Kllol8F I/GN1ouYCzPLXRsqdwYZiJThIUFvIl9P51c9R3hQJp3KS9znXhauIHRFTGoVErrHCuQzh9u+BZA9X W91L1K9WmKOFA2jFbbseNiCbgMOHFjkHeZDKuvJEuHJaXZ6qU7F3zfEstALf4hehKoN5yWjWBVaMF 5HBahXLBu1pQXc4oZjDpV16K/WhvJcf5Q1m17zBUKeuRYx71fWbbTO7tAbKogEZ1LriOuOcnFJ97r gYr9EQDC/BAvbpfvgq94sr4R91EqeRK14J/O5Y+gaBHgU7V+qztjMuEOtvKv6GQjH9ov0Fm6Ug+br Rqb7s2eQ==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qyd7B-000zIt-Fc; Thu, 02 Nov 2023 19:12:25 +0000 Date: Thu, 2 Nov 2023 19:12:25 +0000 From: Matthew Wilcox To: Michal Wajdeczko Cc: linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 3/3] ida: Add kunit based tests for new IDA functions Message-ID: References: <20231102153455.1252-1-michal.wajdeczko@intel.com> <20231102153455.1252-4-michal.wajdeczko@intel.com> Precedence: bulk X-Mailing-List: linux-fsdevel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Nov 02, 2023 at 07:58:16PM +0100, Michal Wajdeczko wrote: > On 02.11.2023 18:43, Matthew Wilcox wrote: > > On Thu, Nov 02, 2023 at 04:34:55PM +0100, Michal Wajdeczko wrote: > >> New functionality of the IDA (contiguous IDs allocations) requires > >> some validation coverage. Add KUnit tests for simple scenarios: > >> - counting single ID at different locations > >> - counting different sets of IDs > >> - ID allocation start at requested position > >> - different contiguous ID allocations are supported > >> > >> More advanced tests for subtle corner cases may come later. > > > > Why are you using kunit instead of extending the existing test-cases? > > I just assumed (maybe wrong) that kunit is preferred these days as some > other components are even converting their existing test code to kunit. > > But also I might be biased as I was working recently with kunit and just > found it helpful in fast test development. Note that to run these new > IDA tests, anyone who cares just need a single command line: > > $ ./tools/testing/kunit/kunit.py run "ida.*" > > But if you feel that having two places with IDA tests is wrong, we can > still convert old tests to kunit (either as follow up or prerequisite) > to this patch (well, already did that locally when started working on > these improvements) Why would using kunit be superior to the existing test suite?