From nobody Wed Apr 8 14:01:19 2026 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 7C1E7C38A02 for ; Fri, 28 Oct 2022 22:18:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230163AbiJ1WSK (ORCPT ); Fri, 28 Oct 2022 18:18:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229571AbiJ1WSH (ORCPT ); Fri, 28 Oct 2022 18:18:07 -0400 Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB95224C967 for ; Fri, 28 Oct 2022 15:18:06 -0700 (PDT) Received: from fews2.riseup.net (fews2-pn.riseup.net [10.0.1.84]) (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 mx1.riseup.net (Postfix) with ESMTPS id 4MzcPV0cgMzDqFC; Fri, 28 Oct 2022 22:18:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1666995486; bh=o+QznyhV3hIjjr8HLNlww/g7V5QGQpu6+kYN6wHY96s=; h=From:To:Cc:Subject:Date:From; b=mcMgNT5eZO9EjynIMSq4ViVA44gocxY8FJQDv1k6zofCNXOqWwXN7puzTam+FAfv8 NUEEGkWt7TiMRBPZTgPotOD8jW/1D6sA7bpdSmIBazi4+cFA0u7Sn/uq6K4lcTXjDo hnG0eGof4NbG1ugrsqjGth9gKep6D/wufIZoK3Kk= X-Riseup-User-ID: 84B3480913F1F914D1A1C52E14951CFE0F8957CA37B981EE12A82DD8D2519D67 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews2.riseup.net (Postfix) with ESMTPSA id 4MzcPQ0pflz1yZp; Fri, 28 Oct 2022 22:18:01 +0000 (UTC) From: Arthur Grillo To: David Airlie , Daniel Vetter , Javier Martinez Canillas , =?UTF-8?q?Ma=C3=ADra=20Canal?= , =?UTF-8?q?Toke=20H=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, Arthur Grillo , =?UTF-8?q?Micha=C5=82=20Winiarski?= Subject: [PATCH v5] drm/tests: Add back seed value information Date: Fri, 28 Oct 2022 19:17:54 -0300 Message-Id: <20221028221755.340487-1-arthurgrillo@riseup.net> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org As reported by Micha=C5=82 the drm_mm and drm_buddy unit tests lost the printk with seed value after they were refactored into KUnit. Add kunit_info with seed value information to assure reproducibility. Reported-by: Micha=C5=82 Winiarski Signed-off-by: Arthur Grillo --- v1->v2: https://lore.kernel.org/all/20221026211458.68432-1-arthurgrillo@ris= eup.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 v2->v3: https://lore.kernel.org/all/20221027142903.200169-1-arthurgrillo@ri= seup.net/ - Change .init to .suite_init - Correct some grammars nits v3->v4: https://lore.kernel.org/all/20221028141246.280079-1-arthurgrillo@ri= seup.net/ - Correct compilation issues v4->v5: https://lore.kernel.org/all/20221028141715.290903-1-arthurgrillo@ri= seup.net/ - Change functions names from init_suite to suite_init --- drivers/gpu/drm/tests/drm_buddy_test.c | 6 ++++-- drivers/gpu/drm/tests/drm_mm_test.c | 8 ++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests= /drm_buddy_test.c index 62f69589a72d..f8ee714df396 100644 --- a/drivers/gpu/drm/tests/drm_buddy_test.c +++ b/drivers/gpu/drm/tests/drm_buddy_test.c @@ -726,11 +726,13 @@ static void drm_test_buddy_alloc_limit(struct kunit *= test) drm_buddy_fini(&mm); } =20 -static int drm_buddy_init_test(struct kunit *test) +static int drm_buddy_suite_init(struct kunit_suite *suite) { while (!random_seed) random_seed =3D get_random_u32(); =20 + kunit_info(suite, "Testing DRM buddy manager, with random_seed=3D0x%x\n",= random_seed); + return 0; } =20 @@ -746,7 +748,7 @@ static struct kunit_case drm_buddy_tests[] =3D { =20 static struct kunit_suite drm_buddy_test_suite =3D { .name =3D "drm_buddy", - .init =3D drm_buddy_init_test, + .suite_init =3D drm_buddy_suite_init, .test_cases =3D drm_buddy_tests, }; =20 diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/dr= m_mm_test.c index c4b66eeae203..89f12d3b4a21 100644 --- a/drivers/gpu/drm/tests/drm_mm_test.c +++ b/drivers/gpu/drm/tests/drm_mm_test.c @@ -2209,11 +2209,15 @@ static void drm_test_mm_color_evict_range(struct ku= nit *test) vfree(nodes); } =20 -static int drm_mm_init_test(struct kunit *test) +static int drm_mm_suite_init(struct kunit_suite *suite) { while (!random_seed) random_seed =3D get_random_u32(); =20 + kunit_info(suite, + "Testing DRM range manager, with random_seed=3D0x%x max_iterations=3D= %u max_prime=3D%u\n", + random_seed, max_iterations, max_prime); + return 0; } =20 @@ -2246,7 +2250,7 @@ static struct kunit_case drm_mm_tests[] =3D { =20 static struct kunit_suite drm_mm_test_suite =3D { .name =3D "drm_mm", - .init =3D drm_mm_init_test, + .suite_init =3D drm_mm_suite_init, .test_cases =3D drm_mm_tests, }; =20 --=20 2.37.3