From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67CADC4707A for ; Tue, 5 Apr 2022 23:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352378AbiDEXgw (ORCPT ); Tue, 5 Apr 2022 19:36:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1443917AbiDEPk2 (ORCPT ); Tue, 5 Apr 2022 11:40:28 -0400 Received: from smtp1.axis.com (smtp1.axis.com [195.60.68.17]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF3ED14DFE5; Tue, 5 Apr 2022 07:02:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=axis.com; q=dns/txt; s=axis-central1; t=1649167344; x=1680703344; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=Quhq+ANDcyqCuN52eIRgLzLh2IoR3G+Ogb7BY7KkCbE=; b=JfWw2js+sHio6dbd67N4f+BKvGcgXqC+jL6zGIBTKIXzryvcIE7qzxyL fAQhMiRTFUrAJ9Wa9Uqfp6pjIffGUKwtBeQ6kq96gPt0Rcx4I/SQa6+tq /4wesHmr64EULkm16LIV+z66YSSuwmFC/PzXL8EuTqLIbViL5BoPaBUqM MtOqJqtCNazap6UZeRrAMa2IfhYQDY98cmlHqo9nrqZ99WVlsnTUi5tsv ZAz3dFApD9DyI+D9oPjtyKzsvhacBT2JvmJ8EVp/x4TIpKfI2wC/zqp6Y 037kX7KxN0Pk+KkpeKGXDQrZUbxYVdVVHYyPgtan+kxbYXgNOylSg7HWN g==; Date: Tue, 5 Apr 2022 16:02:21 +0200 From: Vincent Whitchurch To: Mark Brown CC: , , , , , , , , , , , , , , Subject: Re: [RFC v1 09/10] regulator: tps62864: add roadtest Message-ID: <20220405140221.GC28574@axis.com> References: <20220311162445.346685-1-vincent.whitchurch@axis.com> <20220311162445.346685-10-vincent.whitchurch@axis.com> <20220317151326.GA7832@axis.com> 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) Precedence: bulk List-ID: X-Mailing-List: linux-kselftest@vger.kernel.org On Thu, Mar 17, 2022 at 05:53:22PM +0000, Mark Brown wrote: > On Thu, Mar 17, 2022 at 04:13:26PM +0100, Vincent Whitchurch wrote: > > On Fri, Mar 11, 2022 at 06:06:54PM +0000, Mark Brown wrote: > > > > > + @classmethod > > > > + def setUpClass(cls) -> None: > > > > + insmod("tps6286x-regulator") > > > > Shouldn't this get figured out when the device gets created in DT (if it > > > doesn't I guess the tests found a bug...)? > > > The system isn't set up to load modules automatically. The reason for > > this is to give the test cases full control of when the module is loaded > > and unload, since the tests could want to load the module with specific > > options. > > That seems like the uncommon case which could remove the module if it > explicitly needed it. Another reason was to get the tests to test module unloading since I've seen a lot of especially new driver writers forget to test that, but I realise that for most normal drivers that should be mostly covered by the fact that we test device unbinding. So I went ahead and implemented this and it seems to work. As you hinted earlier, this also means that the modalias stuff gets tested, and as we know that's been broken in the recent past for a bunch of drivers, so that's another advantage to automatic module loading, besides the boilerplate reduction in the tests.