Received: by 2002:a05:6358:f14:b0:e5:3b68:ec04 with SMTP id b20csp3449149rwj; Mon, 19 Dec 2022 19:11:10 -0800 (PST) X-Google-Smtp-Source: AMrXdXuczuZUJj8nW68iJm98hJuw75CZ1csf8DToI83RI1/LJnW0Y14nHV3yjo7MHyKG89DvsucS X-Received: by 2002:a17:902:c205:b0:191:331:ddc7 with SMTP id 5-20020a170902c20500b001910331ddc7mr14090203pll.49.1671505870080; Mon, 19 Dec 2022 19:11:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671505870; cv=none; d=google.com; s=arc-20160816; b=RycG9cdqBmzlZnDNoujTv/R2Z1M0Bqy6o1cIcEb+fObKK7lEeUwwDE5FVjaEdLsZsb lFR/cOTBOtsskvMRpzCu3P5xLM3lCazAxGGK6rAwuqqKm9kYQ7bAtBCg5Or8WR/oEd18 Zgr+1ftlLNlbYXz206b9hw5+EQIRq6vg7L+gybKnHyuQjgOY8cfip3rIUGwtvYdlKjuP eAinThhS+u+M9rFzj/yfLZaVbCiVAMP4le251qPY8E3dMrxDhq6HnIJ0gjtaDuPobCg8 qlJlHfgV+A5fobpGGEnrH/w0Pu8hMukvbZ/iuzNfl5JRiJPSaT1dduAC4JEiNtg3zQqK lfjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=BkBtj6+8JJfQ50Ok+f9pDixvDCZzWD7kJYCtgoKR9wc=; b=w9CbtV4g4N7awpvEBtvL8ZdPgCGmo5ZN/4xWZ53VjNvDG75INAHjQ9GxQHBc3Sv8W8 aFYCr/iV1V0HA5t+8RPT6zr8/KxLSfS4rukmo6CI7sGnA7L+Pd542ldhaInLcFi/qTW9 6+fTbX58IH3Cdl5hBRm3h9//khf4708ZG2A5vQB+1zPWXyoL9Cqh+ijsZxExgFxOWabT GUDLIbAmhefAMDQv5vYaZCldjhZD15rr98SkOwkOKtQ5MihNgphxYKWPv2R3zN+g3kE7 m6efq4vtliYfddsaYafvMQV3vLcFrdS7FNn/yOo+novwBktcrJewIQDV7bhRuCQgdqA9 8mpA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=I8Z9FHoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x17-20020a17090300d100b00189d0fa14d6si12027531plc.13.2022.12.19.19.11.00; Mon, 19 Dec 2022 19:11:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=I8Z9FHoN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232836AbiLTCom (ORCPT + 70 others); Mon, 19 Dec 2022 21:44:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiLTCok (ORCPT ); Mon, 19 Dec 2022 21:44:40 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D3FF12D29; Mon, 19 Dec 2022 18:44:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=BkBtj6+8JJfQ50Ok+f9pDixvDCZzWD7kJYCtgoKR9wc=; b=I8Z9FHoNOAuKlHDWk42AqrJ9KV r1NKhn/zMSDscGpZKKGvfdgjP/vhv2G+NFM8qb5qRPootNnSt4kUuYFZCIfHs02p+FsB+9JMuocBv l2U9VDoxJQ/3kGJ3PNlMPKJIyZSCVAvcoE6JB9JfkAOsIjeFKbSn3GLDTw37A3u/QfVBmCaRq11ex hIhUGulis+VRZPfhS4TTKF79kCxkKT064pnknKZ1/98BX+GWB3aiiww/tzeojnSt6CV5QPf6uTtSS pxCKf8ZX/cXZOo3HBjNgOWj05vwWGqk0/dLD03d9v5tVS9Ypt3DvlV0Sje5Ngh9FZMyojDsArseZ0 aVgsJIKQ==; Received: from mcgrof by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1p7ScF-007fgf-MJ; Tue, 20 Dec 2022 02:44:27 +0000 Date: Mon, 19 Dec 2022 18:44:27 -0800 From: Luis Chamberlain To: Dan Williams Cc: alison.schofield@intel.com, vishal.l.verma@intel.com, ira.weiny@intel.com, bwidawsk@kernel.org, dave@stgolabs.net, a.manzanares@samsung.com, linux-cxl@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC] cxl_test: upgrade as a first class citizen selftests capable driver Message-ID: References: <20221217034947.1174795-1-mcgrof@kernel.org> <639d4bb71bada_b41e329452@dwillia2-xfh.jf.intel.com.notmuch> <63a1015e6ec4a_1bf22944c@dwillia2-xfh.jf.intel.com.notmuch> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63a1015e6ec4a_1bf22944c@dwillia2-xfh.jf.intel.com.notmuch> Sender: Luis Chamberlain X-Spam-Status: No, score=-4.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Dec 19, 2022 at 04:27:10PM -0800, Dan Williams wrote: > Luis Chamberlain wrote: > > On Fri, Dec 16, 2022 at 08:55:19PM -0800, Dan Williams wrote: > > > In other words the suggestion that the current > > > organization ultimately leads to bit rot has not been substantiated in > > > practice. > > > > On top of this patch I just added a custom debug patch to my tree which > > enables CXL_BUS and CXL_TEST by default when this is currently allowed > > and it got quite a bit of kernel build warnings. Although some of these > > are specific to my change, some of them do not seem to be related to > > that and likely could benefit from fixing: > > > > https://gist.github.com/mcgrof/73dce72939590c6edc9413b0384ae4c2 > > > > And so although you may not see some build warnings so far, it does not > > negate my suggestion that having cxl_test as a proper upstream driver strategy > > gets you more build testing / coverage. > > If autobuild coverage of test components is the main concern then > cxl_test can copy what nfit_test is doing with CONFIG_NVDIMM_TEST_BUILD. > No need for disruptive redesign of how this facility is integrated. I've itemized a list of gains of having this properly integrated. What gains are there of this being an external module other than a few folks are used to it and it been done before for other subsystems? > > > The proposed direction to move tests out of the ndctl.git repo into the > > > kernel solves the wrong problem. > > > > That's not in any way what I suggested and is not the point to my patch. > > > > The proposed patch does not suggest to ditch ndctl unit tests but to > > *enable* also sefltests to make use of cxl_test using the selftests > > framework, which is very different. It is not saying "abandon" ndctl > > unit tests, but rather, "also enable linux kernel selftests for CXL with > > cxl_test". > > I think centralizing test scripts is a virtue, and right now the > momentum is with those located ndctl.git. This is why I jumped to the > conclusion that the long term direction would be to pick one location > for maintainer regression tests. That's fine for ndctl unit tests. > > But more importantly, it looks for the value of proper kernel > > integration and making use of kconfig for the actual dependencies > > and requirements. This is of high value. > > > > In addition to this, one possible area I see of value with this change is the > > ability to also use the wrap feature later, even without cxl_test to enable > > error injection. What would this look like? You simply replace one built in > > routine as you do with another which has sprinkled in should_fail() calls, > > which otherwise would be an eyesore upstream. This shold also then not > > depend the rest of cxl_test stuff, but can make use of building > > alternative wrap routines which could be replacement for upstream ones. > > > > Another benefit of this strategy is you can also test cxl_test *without* > > the need for for requiring modules, which some folks prefer for testing. > > At LSFMM this came up for instance and one of the biggest grudges with > > testing some frameworks was the dependency on modules. > > I do think this is the void that QEMU CXL testing would attempt to fill. Not for error injection support. You need proper kernel support for that. Luis