Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp929280iob; Wed, 4 May 2022 10:52:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuKM+Q4E/IBtvFfJsTPmbaFk0IorTQ5NNDbS9qHmKNbiEPw597fFpgHIRl0/Q/tTjOinjN X-Received: by 2002:a17:902:f70f:b0:153:ebfe:21b3 with SMTP id h15-20020a170902f70f00b00153ebfe21b3mr22803092plo.119.1651686764422; Wed, 04 May 2022 10:52:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651686764; cv=none; d=google.com; s=arc-20160816; b=hLcUf6/QhBk+PEZ7CQYJud+1orhmQCiIKOsxtpSzzLx/FVof1R5M8Dc0HF6PnBTGah w7o5AVHpWBp3hx3WbHT55qS6OMT32MU/ca1SZ7hps5XwR8PEUXK0rFOIg/aNalx8XIfW 2YSZqhDRe/aJixWZlGWoeGoqH4c+g6I6jhJ4eq8nGZJpCWiMSbHJLlQOPzxL1Zn7bA+U NADuxGVahKcdhJKzfxE2lqqiWFIciYz7zaYa+FWBPIw3ZZ/NJAVvWt5lwca2+mgmdBTP 3CYoCzi7ANdZTEen9910Stg+1dGjf6UP0a3tUDbpnOlPBjDYnpiFE125jhqYSmxOQO6d 41LA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=if3uv1JcdUh98ACrRo4ZvJgdrj3l4HR7vDdntef3MiY=; b=rlNq0R6+PP5dtFihINT7Y4xH7MYX6JHVL2fe+2C+92An0A0pN07ibk9KQhUWmJxXWX EwwXf9ubL7xp6pjKcVrrALoLju/JAtNGPvzZT5qGnyFDdmsOEI/vjgsBBXq5jMu9Itne JBKRsmVNCPsmjYf6xtIkZ376pozQ8Rt873o0FMCxYdfSSK+sygudRwTb9t3jNdkXPJrJ eWzJU3IT2kWV2zOnriQRf70roYd+0FbgV3EuhOch8hXnn4xZ8914KnQcxWYdWAHbINzB wOXODRqx4An+RsNwJEmmw1BX7HpEpqC0lOC5/MRtwoQ7KFEQYCipmCkKODEwIlBfnW2S CFVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hfckusm0; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c6-20020a170903234600b00156c63972a2si2015521plh.421.2022.05.04.10.52.29; Wed, 04 May 2022 10:52:44 -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=@redhat.com header.s=mimecast20190719 header.b=hfckusm0; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346386AbiEDIiW (ORCPT + 99 others); Wed, 4 May 2022 04:38:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35868 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346291AbiEDIiT (ORCPT ); Wed, 4 May 2022 04:38:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id A2BB424971 for ; Wed, 4 May 2022 01:34:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1651653283; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=if3uv1JcdUh98ACrRo4ZvJgdrj3l4HR7vDdntef3MiY=; b=hfckusm0m3BJNS5hlzZ2ZaMqtq/RuUvqNyFrj2TmTI/5QnPiu6OkbrKmccUtxRrANIkJ/n 4eCBod5SAmd5aqx1M70ll/ZbovXXO4g4Ym1lYSVLHi/wHzpSxcmMVS6a+t6Qv5/8yqX0mg PzIkdBw28BFqUOBfsiSDGQiQNlsfxNo= Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-313-NuRd3UpWNjuGTM-qd74sng-1; Wed, 04 May 2022 04:34:42 -0400 X-MC-Unique: NuRd3UpWNjuGTM-qd74sng-1 Received: by mail-wm1-f72.google.com with SMTP id v184-20020a1cacc1000000b00393e492a398so2681967wme.5 for ; Wed, 04 May 2022 01:34:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=if3uv1JcdUh98ACrRo4ZvJgdrj3l4HR7vDdntef3MiY=; b=Cwq2Z0ioMEdX9gd1bKpPgP/H8ahuyLiwdRyK4RRRpgCyM8q4xmYhlql11HN4u+tTd1 ESXdSaVJ2mtaTUcL6e2HKqPyIIHb/Eok5NEa5LpSpLbCfFEQ1glDuH9ENJwxFPWoL0px PZnfawp3dHcijuLtJzXsfyNZRpFTIe+Q/tqmR/8MZX6dvx3tJpxvwYo4M/pA48v1AseR UJrUcvIlRkGqjPBT910su2Rd8WBq2/N2Ls2bmkxnAak00LyQrubavcUxCjA43vpZNbs6 ZzrOqcFdkucYzyJDb4Aeupy/DS8V34v8D+kByE6bCmpkhTZJpWQPjPCtZZDuX7w/Hp4U Lq3g== X-Gm-Message-State: AOAM530qbljwqF5UVSra8Liqsoh/9cb3k2AaO+/SEE8TbkkI7f4NGOec bEHEusC2JiV1Jz0KpCG+t7a9wKiNe4ul9xcAmbBnC2U6iwlKiWNTbeqJhzoN8D3gSLqZhj5YgLs PHMBHFjDDQm+PA2BFc5cwL2wL X-Received: by 2002:a05:600c:4ed3:b0:394:20e7:bb86 with SMTP id g19-20020a05600c4ed300b0039420e7bb86mr6555293wmq.169.1651653281545; Wed, 04 May 2022 01:34:41 -0700 (PDT) X-Received: by 2002:a05:600c:4ed3:b0:394:20e7:bb86 with SMTP id g19-20020a05600c4ed300b0039420e7bb86mr6555283wmq.169.1651653281303; Wed, 04 May 2022 01:34:41 -0700 (PDT) Received: from [192.168.1.129] (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id h19-20020a1ccc13000000b003942a244ed7sm3318494wmb.28.2022.05.04.01.34.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 04 May 2022 01:34:41 -0700 (PDT) Message-ID: Date: Wed, 4 May 2022 10:34:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] drm/todo: Add entry for using kunit in the subsystem Content-Language: en-US To: Maxime Ripard Cc: Thomas Zimmermann , Jonathan Corbet , David Airlie , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20220504080212.713275-1-javierm@redhat.com> <20220504081030.ky57nenipnif5r2e@houat> From: Javier Martinez Canillas In-Reply-To: <20220504081030.ky57nenipnif5r2e@houat> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE 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 Hello Maxime, Thanks for your feedback. On 5/4/22 10:10, Maxime Ripard wrote: > Hi, > > On Wed, May 04, 2022 at 10:02:12AM +0200, Javier Martinez Canillas wrote: >> The Kernel Unit Testing (KUnit) framework provides a common framework for >> unit tests within the Linux kernel. Having a test suite would allow to >> identify regressions earlier. >> >> Signed-off-by: Javier Martinez Canillas >> --- >> >> Documentation/gpu/todo.rst | 14 ++++++++++++++ >> 1 file changed, 14 insertions(+) >> >> diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst >> index 127e76ee0b2d..10bfb50908d1 100644 >> --- a/Documentation/gpu/todo.rst >> +++ b/Documentation/gpu/todo.rst >> @@ -603,6 +603,20 @@ Level: Advanced >> Better Testing >> ============== >> >> +Add unit tests using the Kernel Unit Testing (KUnit) framework >> +-------------------------------------------------------------- >> + >> +The `KUnit `_ >> +provides a common framework for unit tests within the Linux kernel. Having a >> +test suite would allow to identify regressions earlier. >> + >> +A good candidate for the first unit tests are the format-conversion helpers in >> +``drm_format_helper.c``. >> + >> +Contact: Javier Martinez Canillas >> + >> +Level: Intermediate > > Kunit is fairly easy to grasp if you have some knowledge of other unit > testing frameworks already (pytest, cmocka, etc.) > Yes, I didn't set to intermediate due kunit but rather due the format conversions, since the functions are not easy to read and understand. And the person writing the unit tests will have to get familiar with the different formats to verify that conversions are done correctly. > Another good candidate would be to convert (some ?) selftests to kunit. > I'm not sure the others, but at least test-drm_cmdline_parser should be > fairly easy to convert. > Indeed. Maybe I would add it as a separate entr though, as a follow-up. > Maxime -- Best regards, Javier Martinez Canillas Linux Engineering Red Hat