From patchwork Wed Oct 26 21:14:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arthur Grillo X-Patchwork-Id: 13021713 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 96E85C67871 for ; Thu, 27 Oct 2022 07:23:50 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5D0CE10E34D; Thu, 27 Oct 2022 07:23:48 +0000 (UTC) Received: from mx1.riseup.net (mx1.riseup.net [198.252.153.129]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2026010E2BE for ; Wed, 26 Oct 2022 21:15:11 +0000 (UTC) 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 mx1.riseup.net (Postfix) with ESMTPS id 4MyM5p2hhWzDqXT; Wed, 26 Oct 2022 21:15:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1666818910; bh=APYOM4y7kgiXVNJBM6mveeMKzmAiEbIw4YkLWM5pJZo=; h=From:To:Cc:Subject:Date:From; b=Ra9lX8oCSmzSTdW7tjYozHU8DsdSPwtjywDlyTrJQd3Lm77LyEcmbd78BmJwo1lCD OEyLozx7JbGxsnWlxng8o1D6aB5HAf/6LuMpr+syZcjdrfrkRtGcACqbT/laEpT8cT c6qi8l6KbiJL7Jb/ozxtq+pSAF5NJ5k9MALtHdcQ= X-Riseup-User-ID: B8985AC8A5ACF8A065AFF6B3A5F7E11411B5160F54633E5E622691687DA7D7C4 Received: from [127.0.0.1] (localhost [127.0.0.1]) by fews1.riseup.net (Postfix) with ESMTPSA id 4MyM5k2VGXz5vS7; Wed, 26 Oct 2022 21:15:06 +0000 (UTC) From: Arthur Grillo To: David Airlie , Daniel Vetter , Javier Martinez Canillas , =?utf-8?q?Ma=C3=ADra_Canal?= , =?utf-8?q?Toke_H?= =?utf-8?q?=C3=B8iland-J=C3=B8rgensen?= , "Jason A. Donenfeld" Subject: [PATCH] drm/tests: Add back seed value information Date: Wed, 26 Oct 2022 18:14:58 -0300 Message-Id: <20221026211458.68432-1-arthurgrillo@riseup.net> MIME-Version: 1.0 X-Mailman-Approved-At: Thu, 27 Oct 2022 07:23:46 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?utf-8?q?Micha=C5=82_Winiarski?= , Daniel Latypov , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, melissa.srw@gmail.com, David Gow , andrealmeid@riseup.net, Arthur Grillo Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" As reported by Michał the drm_mm and drm_buddy unit tests lost the printk with seed value after they being refactored into kunit. This patch adds back this important information to assure reproducibility converting them to use the kunit api. Signed-off-by: Arthur Grillo Reported-by: Michał Winiarski --- drivers/gpu/drm/tests/drm_buddy_test.c | 3 +++ drivers/gpu/drm/tests/drm_mm_test.c | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tests/drm_buddy_test.c b/drivers/gpu/drm/tests/drm_buddy_test.c index 62f69589a72d..83c8863bc643 100644 --- a/drivers/gpu/drm/tests/drm_buddy_test.c +++ b/drivers/gpu/drm/tests/drm_buddy_test.c @@ -731,6 +731,9 @@ static int drm_buddy_init_test(struct kunit *test) while (!random_seed) random_seed = get_random_u32(); + kunit_info("Testing DRM buddy manager (struct drm_buddy), with random_seed=0x%x\n", + random_seed); + return 0; } diff --git a/drivers/gpu/drm/tests/drm_mm_test.c b/drivers/gpu/drm/tests/drm_mm_test.c index c4b66eeae203..492347069d58 100644 --- a/drivers/gpu/drm/tests/drm_mm_test.c +++ b/drivers/gpu/drm/tests/drm_mm_test.c @@ -2214,6 +2214,9 @@ static int drm_mm_init_test(struct kunit *test) while (!random_seed) random_seed = get_random_u32(); + kunit_info("Testing DRM range manager (struct drm_mm), with random_seed=0x%x max_iterations=%u max_prime=%u\n", + random_seed, max_iterations, max_prime); + return 0; } @@ -2251,6 +2254,5 @@ static struct kunit_suite drm_mm_test_suite = { }; kunit_test_suite(drm_mm_test_suite); - MODULE_AUTHOR("Intel Corporation"); MODULE_LICENSE("GPL");