Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5984150rwl; Wed, 22 Mar 2023 05:09:57 -0700 (PDT) X-Google-Smtp-Source: AK7set8yZm/Z0lzizXatWaHDhHf/FXX28UCK2W6+HZ/+KXlXFG0DvR1Ng1M0SCa2gkj++iC8MyOO X-Received: by 2002:aa7:c451:0:b0:500:58c2:41f3 with SMTP id n17-20020aa7c451000000b0050058c241f3mr2019680edr.19.1679486996979; Wed, 22 Mar 2023 05:09:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679486996; cv=none; d=google.com; s=arc-20160816; b=q/G1r2f8jgwY5vDnfCzwgiwC+f3BBBd+SA870ZNpkklwCsjYtJm7lrYaRnAAbWDWLE xY8vDyzHOugHZDAAsh0c+yI/y5q9yswuWrwtV779lzHgx9fYkvGwt+myMafmyT7YjHRg qzoRvMrT0AvQ9u3xz1w1sVEIZHt8qd+N9vnA+PzRCiZ1Fwt/a3dWjbxp9C7dp+kejxWD N1C/ZF+3c6qcIZCmZUjltrN617EXmVnTmRfs9XkdtzOzaOYKjsz4VvwVLbIQrCdqQW5T LO89RsdsRhD0fshoVPcIQ2SawqKNz9Hcoa+AoPuaoRpAuBNfv9mwMwAONDfnMmjmMcdw JSVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=bKI/lBGmkomGZYp7PYKye1FuRRnK7cWW48DYNdvgyGw=; b=jpTfhyioFrG2PIWabvIIbCqNYECuLLMFuoQ0U4OQJg3g5nN15gAFp9hccDEHf0qbJr NKK+6eepdidPO9jRogdiAKhwO+b6fYX2KBecSzV4e3WSgFz3+fuZ9QMVfL8QULTXErnF eT5zg7LloR5DgmXflpDm6tR7L+S2Zm5ejikMnuzzGOQMnv3+BoboG4pjE/o9kJkpR5sM GC1k4u+FjfVzDFxUHnyEcOVwu4SNFpfbcS5ADG3d0lfKvwauASWzXM7GYF0IJUnpM6Y3 QB3bBBDhEAda0DSEJlSqmiwIRXLzqwx4gsHx4K/o23qhEmakI6Ejkx4+D0FnET+mdrin jihQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=eLjSCToO; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id dy27-20020a05640231fb00b004fe95a9e4f6si14920600edb.493.2023.03.22.05.09.29; Wed, 22 Mar 2023 05:09:56 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=eLjSCToO; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229987AbjCVMI4 (ORCPT + 99 others); Wed, 22 Mar 2023 08:08:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229861AbjCVMIx (ORCPT ); Wed, 22 Mar 2023 08:08:53 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BB0CE1B565; Wed, 22 Mar 2023 05:08:52 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6EA89B81C6C; Wed, 22 Mar 2023 12:08:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A569DC433D2; Wed, 22 Mar 2023 12:08:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1679486930; bh=sJgqKtzzq3ORWa9DfGXW323DtqlfE2Drg0E8BukAMlg=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eLjSCToO82eR1amnA3qQHvVMdhrGc2jiFxdfFo85O9HqsaVg5qqg24nywG8tW1PfS iEENAPBQ+K2SzSX6DQRAnhJzUB1m7n5y6N5JFz1mO/2kLffrVgOD5nXpaTkDK1ZbTD zos8rNaRYxgUf8Hlts4Ik9t//juUasJLBG9s3xEY= Date: Wed, 22 Mar 2023 13:08:47 +0100 From: Greg Kroah-Hartman To: Matti Vaittinen Cc: Matti Vaittinen , "Rafael J. Wysocki" , Brendan Higgins , David Gow , Andy Shevchenko , Heikki Krogerus , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org, kunit-dev@googlegroups.com, Stephen Boyd , Maxime Ripard , Jonathan Cameron , linux-iio@vger.kernel.org Subject: Re: [PATCH v5 1/8] drivers: kunit: Generic helpers for test device creation Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.5 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 Wed, Mar 22, 2023 at 11:05:55AM +0200, Matti Vaittinen wrote: > The creation of a dummy device in order to test managed interfaces is a > generally useful test feature. The drm test helpers > drm_kunit_helper_alloc_device() and drm_kunit_helper_free_device() > are doing exactly this. It makes no sense that each and every component > which intends to be testing managed interfaces will create similar > helpers so stole these for more generic use. > > Signed-off-by: Matti Vaittinen > > --- > Changes: > v4 => v5: > - Add accidentally dropped header and email recipients > - do not rename + move helpers from DRM but add temporary dublicates to > simplify merging. (This patch does not touch DRM and can be merged > separately. DRM patch and IIO test patch still depend on this one). > > Please note that there's something similar ongoing in the CCF: > https://lore.kernel.org/all/20230302013822.1808711-1-sboyd@kernel.org/ > > I do like the simplicity of these DRM-originated helpers so I think > they're worth. I do equally like the Stephen's idea of having the > "dummy platform device" related helpers under drivers/base and the > header being in include/kunit/platform_device.h which is similar to real > platform device under include/linux/platform_device.h > --- > drivers/base/test/Kconfig | 5 ++ > drivers/base/test/Makefile | 2 + > drivers/base/test/test_kunit_device.c | 83 +++++++++++++++++++++++++++ By putting files in this directory, you are asking me to maintain this code, and right now, I can't agree with that, sorry. See my review comments on it for why. thanks, greg k-h