Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp994865rwi; Thu, 27 Oct 2022 09:52:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6zdrUNyCfboMRdhPGUVFcb5d4OjgDNP9jf+kZR0YVfPOgEm6OC1RBgsjAf+4TcPr6kNSXE X-Received: by 2002:a05:6402:5485:b0:459:147a:d902 with SMTP id fg5-20020a056402548500b00459147ad902mr48259669edb.263.1666889546994; Thu, 27 Oct 2022 09:52:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666889546; cv=none; d=google.com; s=arc-20160816; b=kHKabTbm8JfR1YaYYEUwPr1i4kob1lU8GuDjMW05EMTuWrCQIozq8L7GFxxdHqdUqV jBXXCqA8yKbA+ZGeprUqkQfAUy9Usbyc/ClJL1DuYoD5ubYfYtfYIlwM245t7GCT40s6 R5eSSCxILuxkhSHfV3i1sgMybBd3xkNhPKlGUEWbawxNCxKHMGCh+YY/8loE1i8NiCwY AKvcVZu0wfuGmEXUQeYA0ndfo0W3kWrNiV48cXqqifrLMqQq7qSOLlh7sJbDKsAJYLNs KeCSs3JAVpudtnnai7n1lxKimisYxvBegcP/Bj+g1wa1LwvHeVj13LLhehAMJStzVdWp 4SrA== 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 :content-language:references:cc:to:subject:mime-version:date :message-id:dkim-signature; bh=GpmpWMp5aiNTxKmiCEr9mc9F7Hpb69v+vvOZkrGDxgk=; b=GzY81QN8EWOpW0WpfUvK+KmWxCqYMLIy3K9tRGjG4i84jZO7cBRTxpz9uxeQBMqPet xdyhLG+vSZZ2sdRUBkwWbGLCDa6ahWrYGQChY/DBmZ6TkVJaKFy64HIWvXlFI3AeG3LH HlGTAyi8FUqB9G05nuwgCWNkudglm/wBZc84D/VS8fJtLHTeeZr77eFbJYEv4btkToAw AGAUjz+OGIRZB1pOfpSSURtEPzP2sMRMm4uiepdyK3RBkWYcIuzzgDUxBF+KfYCPy1Pj zVF2gHe6SOY+trZmZDuIR5kDNJIuJWzV1QtccqNhirkd2a1zxGYKfRrsxpV7QQ+3c/ZE 3IIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@riseup.net header.s=squak header.b=leiegaE9; 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=riseup.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y12-20020a056402440c00b00461c0fd2597si2667530eda.89.2022.10.27.09.52.02; Thu, 27 Oct 2022 09:52:26 -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=@riseup.net header.s=squak header.b=leiegaE9; 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=riseup.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236087AbiJ0QeS (ORCPT + 99 others); Thu, 27 Oct 2022 12:34:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235493AbiJ0QeQ (ORCPT ); Thu, 27 Oct 2022 12:34:16 -0400 Received: from mx0.riseup.net (mx0.riseup.net [198.252.153.6]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 066D3C509C for ; Thu, 27 Oct 2022 09:34:14 -0700 (PDT) Received: from fews1.riseup.net (fews1-pn.riseup.net [10.0.1.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mail.riseup.net", Issuer "R3" (not verified)) by mx0.riseup.net (Postfix) with ESMTPS id 4Myrq96lsqz9s5L; Thu, 27 Oct 2022 16:34:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1666888454; bh=J4ygBh+OjH6+zJ/f+L7SeeBqOZrbDAyt8ylFmhMmOOY=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=leiegaE9hfuVzp5jGxKhU4c3CAg1pDKytZOTEbPJxL/DIDyyiP4ChLyz1cWPPu133 cbieNYwag+EJPDkfGPorPzn/IiTVWQ8WbLkWhsuEW46Fz3pSEKlPOukgKwN/siHvjk WJBdvMfaz9hgFwd92Td7uWfb//avP+y/tDRVV6mo= X-Riseup-User-ID: D12952F7A1A4DD109A7FA0664F46003D5026606957E13428C9749E5F7A86364B Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4Myrq54Ntfz5vSS; Thu, 27 Oct 2022 16:34:09 +0000 (UTC) Message-ID: <2692de92-90e4-4a17-6609-da1bdfa5c850@riseup.net> Date: Thu, 27 Oct 2022 13:34:04 -0300 MIME-Version: 1.0 Subject: Re: [PATCH v2] drm/tests: Add back seed value information To: Arthur Grillo , David Airlie , Daniel Vetter , Javier Martinez Canillas , =?UTF-8?Q?Toke_H=c3=b8iland-J=c3=b8rgensen?= , "Jason A. Donenfeld" Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, David Gow , Daniel Latypov , andrealmeid@riseup.net, melissa.srw@gmail.com, =?UTF-8?Q?Micha=c5=82_Winiarski?= References: <20221027142903.200169-1-arthurgrillo@riseup.net> Content-Language: en-US From: =?UTF-8?Q?Ma=c3=adra_Canal?= In-Reply-To: <20221027142903.200169-1-arthurgrillo@riseup.net> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS 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 Hi Arthur, On 10/27/22 11:29, Arthur Grillo wrote: > As reported by Michał the drm_mm and drm_buddy unit tests lost the > printk with seed value after they where refactored into KUnit. This > patch add back this important information to assure reproducibility and > convert them to the KUnit API. Some grammar nits: - s/where/were - s/add/adds Moreover, you could write the commit message as André indicated, that is: in imperative form. > > Reported-by: Michał Winiarski > Signed-off-by: Arthur Grillo > --- > v1->v2: https://lore.kernel.org/all/20221026211458.68432-1-arthurgrillo@riseup.net/ > - Correct compilation issues > - Change tags order > - Remove useless line change > - Write commit message in imperative form > - Remove redundant message part > - Correct some grammars nits > - Correct checkpatch issues > > --- > drivers/gpu/drm/tests/drm_buddy_test.c | 4 ++++ > drivers/gpu/drm/tests/drm_mm_test.c | 4 ++++ > 2 files changed, 8 insertions(+) > > diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c > index 62f69589a72d..258137e9c047 100644 > --- a/drivers/gpu/drm/tests/drm_buddy_test.c > +++ b/drivers/gpu/drm/tests/drm_buddy_test.c > @@ -731,6 +731,10 @@ static int drm_buddy_init_test(struct kunit *test) > while (!random_seed) > random_seed = get_random_u32(); > > + kunit_info(test, > + "Testing DRM buddy manager, with random_seed=0x%x\n", > + random_seed); > + > return 0; > } > As I was checking the log, I realized that the random_seed only needs to be generated by the start of the test suite, so this drm_buddy_init_test could be a suite_init function, instead of an init function. This way the random_seed will be generated by the start of the suite and the log will be printed just once. > diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c > index c4b66eeae203..bec006e044a4 100644 > --- a/drivers/gpu/drm/tests/drm_mm_test.c > +++ b/drivers/gpu/drm/tests/drm_mm_test.c > @@ -2214,6 +2214,10 @@ static int drm_mm_init_test(struct kunit *test) > while (!random_seed) > random_seed = get_random_u32(); > > + kunit_info(test, > + "Testing DRM range manager, with random_seed=0x%x max_iterations=%u max_prime=%u\n", > + random_seed, max_iterations, max_prime); > + Same here. Best Regards, - Maíra Canal > return 0; > } >