Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp267993iof; Mon, 6 Jun 2022 03:09:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4Oriq87GOI1xY/mRAY9rGumRAb1zpTSBkTSnxSQKZJFFS1lbZyJRlVISC+JU89Jklz2zv X-Received: by 2002:a63:6a85:0:b0:3fa:722a:fbdc with SMTP id f127-20020a636a85000000b003fa722afbdcmr20467523pgc.174.1654510156651; Mon, 06 Jun 2022 03:09:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654510156; cv=none; d=google.com; s=arc-20160816; b=OC1uqtSo8fW85ZHZ7NYFIXAl5SBQyqtrRr94dTRbba0BmGG7wHLn4KjcwVUtiuWuI0 rnig/bySupFam+tozRLZCJrt/AJd1TMy+rO0eCeEWTecFGiaER2pj2nGNgNOpQBZuUfg 83tfFfNjD7B004bKgRnew64SJblYQkRVZtJme3TdLGXCwGszBZM33rnYrDpNrCvS5UQi 49HhOG+HXm1xaqYhSCGAU3CHjvYb72HZhtlG4rZYiNJvOZOeg1ebBWazX3WZwKaFP/NA 5rVxsGD5Wypbo88gy8gyIVPFS3eGiR/UW5/un8OrrPa/0SOdjsMQ32q/jWjn5Xat0LYn SqVg== 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-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=pZxJjfzSiCSZsMONOLroxHj+cORse23nRQ7Nf9aFbIc=; b=iXnwzspGhj9FpmENlNXyzs/JqC75H+P16O2BoY/+Fh3JFDp6kwi6QaIVgA8M5oY3aS IkAd7tYqwOZ92JE42UsE+jmdmfjdxPQEYsjrxtx/I/8wca8L60pY4EEdnsLV+vq4+Mmb +oLS6W6WtpbYb42yk37/U0QiTWYMUVALBNsVrN2xc2MkD6jan929AsCn64Kgl5eOx9kj 5lLiAl3EqCTgzFZHVxkgmP0DRL+YVYjlAyVGeOW/KE2lpom1evTSRagl3U3xn2ZV+3tk 7y7QLwSXY2veAxtQl00CZ/AtpEQKRshDiIM2VP7EQUiWTUYXobt0wHxa8CSw39aEMTxn gj4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=puvFF5bw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id s1-20020a170903200100b00163b777cbfbsi14949567pla.184.2022.06.06.03.09.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 03:09:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=puvFF5bw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C4F151EAC8; Mon, 6 Jun 2022 02:44:18 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233219AbiFFJoF (ORCPT + 99 others); Mon, 6 Jun 2022 05:44:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47888 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233204AbiFFJoE (ORCPT ); Mon, 6 Jun 2022 05:44:04 -0400 Received: from mail-wm1-x333.google.com (mail-wm1-x333.google.com [IPv6:2a00:1450:4864:20::333]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0BE001BEA2 for ; Mon, 6 Jun 2022 02:44:03 -0700 (PDT) Received: by mail-wm1-x333.google.com with SMTP id z9so583637wmf.3 for ; Mon, 06 Jun 2022 02:44:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=pZxJjfzSiCSZsMONOLroxHj+cORse23nRQ7Nf9aFbIc=; b=puvFF5bwhhEj943FfBvEgJQNken3NkxQXXVtOTW9FZ0wWYxuufZaGSEPSxzGFlW2V+ NwCaRIBw6GwBp7XyXBxOCty2lYhcvKXkr6YUgxRs5J3ACpmDfC5q2D4M+w8VluKsk3g6 cknukAivObmf3R+Y0ANqLyc+ThVXeByD/kkR0S0Gv61lgCdnEsDfrNFulNjww9Kbd09/ cg0QtoM4Bd5s2JUdTbnn+WAIJBsfrK+onQ5aNZmboBXOU2E/8bhfnGYtcSc9XmFBFgcn RND9Dron4qv6GnVM+FqfPO/NZlsNfkxwpA7X/F+P7yDfDvNBR3YOPFW5nSgRFrvNTBuL 0+1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=pZxJjfzSiCSZsMONOLroxHj+cORse23nRQ7Nf9aFbIc=; b=hIIi+KorZaz2wShi8K76kwFd0JLqh1GfQSPLjuha0PwTSQbWZwg0qIKU+bnya/BTBS 76Qk0pBlv99P1KwQ9SJHRq/Q6ARSeFH/XZLP9ZMS9ywIbqAzDvK9mojNdo0FNOpKBoHl Xf+6MnePbki/ku/KCvjI+Ma19/UGB1zP3VuBqqFDzTE9bEOK67FqGzQQLaQT7pKTOBN4 BpFiyZc9qpaxiH3BCutjS2KZcfxt4p08dZEqCsq5hIjTcD4pQo9oHyv18Il6ESrAc8+H glKZdliovSDUSylWC4I/exd2mA5Ik3kRdVg1nIzLCjAZkBQ7ZF3Pwq9qz5HWsXdI++i8 Gmiw== X-Gm-Message-State: AOAM533gIeapIXx31sbbxR1j2jzyv7WgjudhTTpFtIn7pqlgdJfWRniX KfgnSyG99GPXqn+1NCMH+tc= X-Received: by 2002:a05:600c:3c91:b0:39b:6b:d5de with SMTP id bg17-20020a05600c3c9100b0039b006bd5demr39564985wmb.132.1654508641506; Mon, 06 Jun 2022 02:44:01 -0700 (PDT) Received: from elementary ([94.73.36.128]) by smtp.gmail.com with ESMTPSA id l6-20020a5d4bc6000000b0020e615bab7bsm14956105wrt.7.2022.06.06.02.43.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Jun 2022 02:44:00 -0700 (PDT) Date: Mon, 6 Jun 2022 11:43:52 +0200 From: =?iso-8859-1?Q?Jos=E9_Exp=F3sito?= To: Javier Martinez Canillas Cc: David Gow , tzimmermann@suse.de, maarten.lankhorst@linux.intel.com, mripard@kernel.org, David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Linux Kernel Mailing List , Daniel Latypov , KUnit Development Subject: Re: [RFC PATCH 1/1] drm/format-helper: Add KUnit tests for drm_fb_xrgb8888_to_rgb332() Message-ID: <20220606094352.GA937049@elementary> References: <20220530102017.471865-1-jose.exposito89@gmail.com> <20220530102017.471865-2-jose.exposito89@gmail.com> <195c6865-d6f7-fbc4-6ee5-784c5c49d243@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <195c6865-d6f7-fbc4-6ee5-784c5c49d243@redhat.com> X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hello everyone, On Thu, Jun 02, 2022 at 07:21:28PM +0200, Javier Martinez Canillas wrote: > Hello David, > > On 6/2/22 19:07, David Gow wrote: > > On Thu, Jun 2, 2022 at 9:27 AM Javier Martinez Canillas > > [snip] > > >> > >> And doing that will also allow you to get rid of this, since just selecting > >> CONFIG_DRM_KUNIT_TEST=y would be enough for the tests built and run by KUnit. > >> > > > > This is definitely something other KUnit tests (apparmor, elf, etc) > > are doing, and it's generally fine. You do lose the ability to build > > the tests as a separate module, though. (This is not usually a big > > problem, but there are some cases where it's useful.) > > > > That being said, I don't think 'select' is enough of a problem that > > you should feel the need to refactor in this way just to avoid it. > > Oh, yes I didn't want to imply that this was the main reason but just > pointed out that wouldn't even be needed if done that way. And it is > something that we want to do anyway IMO, since as mentioned it would > allow to test the static functions, which are the majority the format > helpers in that file. Conversion functions alway call drm_fb_xfrm()/drm_fb_xfrm_toio() and their *_line function. For example, drm_fb_xrgb8888_to_rgb332() calls drm_fb_xfrm() and drm_fb_xrgb8888_to_rgb332_line(). The current tests already check that the *_line() function works as expected. I'd like to test the high-level functions first and, if required, go into more detail in the future. The refactor is pretty easy, so I'd prefer to keep it as it is for the moment. About the other changes suggested, I applied all of them over the weekend. I'll send v1 of the patch to the mailing list including them so we have an up to date code to comment on. Thanks a lot for all of your comments and help, Jos? Exp?sito