From mboxrd@z Thu Jan 1 00:00:00 1970 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 CD813ECD6FC for ; Thu, 12 Feb 2026 00:14:48 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BBC410E687; Thu, 12 Feb 2026 00:14:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="gN33cuKm"; dkim-atps=neutral Received: from mail-oa1-f45.google.com (mail-oa1-f45.google.com [209.85.160.45]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7885710E677 for ; Thu, 12 Feb 2026 00:14:45 +0000 (UTC) Received: by mail-oa1-f45.google.com with SMTP id 586e51a60fabf-404254ffe8aso943007fac.0 for ; Wed, 11 Feb 2026 16:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1770855284; x=1771460084; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZxTkOltoVAiRQNIiLPEo11+229bHMC78x0TMXlU2wIM=; b=gN33cuKmlHDabrPAXm41762v5QA/Jl1zXmJh3gfpwRmPecUvNr8VwEeb/9ND++tsyB RmMFjZFeKSY4XtAAjQF7yjKMsQAd3OuYliAr5EXeAuCaM2YYjcRnObm5KLcHZJGU89NJ IBZ6KNi1OLRDImUDfJfC41uqHNjkgo0hOhNaFk2LlIjlX9by9cqTz8wau1A3CWZmPRia 6JaPUo6fuLYSdcucdhuZ7Bu/sf7QplxZxGe+0D1FGa7YItRekUOSPxc3HRSPGgUEcAX3 nvgCu1/tWS5p+NBC9L3kvBo20aYy51Acuw2tuuJhg8hq+Kd8j8k5ATiI3uwNrHzvcu/H uWbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770855284; x=1771460084; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZxTkOltoVAiRQNIiLPEo11+229bHMC78x0TMXlU2wIM=; b=mCriVcsgYi3wvwlBQJTFjSNfQU1fKtcmUZTQ4aZml/CeUNiOf3VA9ZP8O8XE/vgI2/ OgJQnTrmecQW6gq8upQLvmgKP3uIbGLsTxKA7Nf+BFpfUZ+L8LJkEZTxhBGpR2kTunHw U9nLAz7/7Q1Yt1hNMUpnDkw9YZEeYIrX5ctylizmpPR+GtbYmV1fVEeD4hcdu5mKXNet v42tmmw510WCHr0Sgz2GvFcvDryybSTceKUACPt0IrHAgS2QHMi1fAq1NDi9VEuaIz38 sNOyQRKsQlkkKmI3mP8bH6rD0HB0svVTQWDuJGROR6X0HRrg0U/mkBm8o4iyfNxo6R5U b+kg== X-Gm-Message-State: AOJu0Yygh7dHKt6gpD+updMX0PkWOeGr+h2SDHr5ZpHYo6p2E3WiEjD4 lDoNi6mHMhrPEAYFwk49vIcHuam89bw80IuTwzPBrFH7d1HUyQVCw+JG+sKqrw== X-Gm-Gg: AZuq6aIC73oYY8GBJlf+bxsJvGKKJd3lgMK5zyRKKszGVmN4Y8C3fUpU8hem85Ne13P xvlpDzLuegxeiM9blVmT1J37Wg4LrZD7HFIopQC9aDhh3dt/o86d0tWZhjwRqMCSgqbHhvoHuXt M7yfi7teAyD2kKC7a5Nk4oVL0ZYBtBJKIGsK4fHf0iSb8WNn2IbiuNcVEJaWEYbyuIVcmIAPqeM sdvMkrW91hg3jaLlHw7SJXf6twP7G29CECOxhmwrm+yPqnrBFQrkF4pyHUoqCf0I7PpKl+CnD/F EZJG/OVa/dHFuHROicjNu8pHtK30V+26+LDmg85q4w7Alvh43VNcE84sraMMuyazGdDmBaRtRTy AW4p5+wcQeP+65f9rj3wvScH3ScnYRcPXu8kvn9kranDhiYaxFmqxOF2LDYk9VRwIXBT4krTVY+ 1vPt9qq4HYe61Fpei1cEWbGC+IoPylCnaJrocAXGokEFIGR0rek29j X-Received: by 2002:a05:6870:40d3:b0:3c9:a286:fb1c with SMTP id 586e51a60fabf-40ec8a79d88mr474761fac.24.1770855284319; Wed, 11 Feb 2026 16:14:44 -0800 (PST) Received: from godzilla (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 586e51a60fabf-40eaf1062ffsm2331939fac.13.2026.02.11.16.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Feb 2026 16:14:43 -0800 (PST) From: Jim Cromie To: dri-devel@lists.freedesktop.org, intel-gfx-trybot@lists.freedesktop.org Cc: Jim Cromie , Louis Chauvet Subject: [PATCH 29/61] selftests-dyndbg: add test_mod_submod Date: Wed, 11 Feb 2026 17:13:24 -0700 Message-ID: <20260212001359.97296-30-jim.cromie@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260212001359.97296-29-jim.cromie@gmail.com> References: <20260212001359.97296-1-jim.cromie@gmail.com> <20260212001359.97296-2-jim.cromie@gmail.com> <20260212001359.97296-3-jim.cromie@gmail.com> <20260212001359.97296-4-jim.cromie@gmail.com> <20260212001359.97296-5-jim.cromie@gmail.com> <20260212001359.97296-6-jim.cromie@gmail.com> <20260212001359.97296-7-jim.cromie@gmail.com> <20260212001359.97296-8-jim.cromie@gmail.com> <20260212001359.97296-9-jim.cromie@gmail.com> <20260212001359.97296-10-jim.cromie@gmail.com> <20260212001359.97296-11-jim.cromie@gmail.com> <20260212001359.97296-12-jim.cromie@gmail.com> <20260212001359.97296-13-jim.cromie@gmail.com> <20260212001359.97296-14-jim.cromie@gmail.com> <20260212001359.97296-15-jim.cromie@gmail.com> <20260212001359.97296-16-jim.cromie@gmail.com> <20260212001359.97296-17-jim.cromie@gmail.com> <20260212001359.97296-18-jim.cromie@gmail.com> <20260212001359.97296-19-jim.cromie@gmail.com> <20260212001359.97296-20-jim.cromie@gmail.com> <20260212001359.97296-21-jim.cromie@gmail.com> <20260212001359.97296-22-jim.cromie@gmail.com> <20260212001359.97296-23-jim.cromie@gmail.com> <20260212001359.97296-24-jim.cromie@gmail.com> <20260212001359.97296-25-jim.cromie@gmail.com> <20260212001359.97296-26-jim.cromie@gmail.com> <20260212001359.97296-27-jim.cromie@gmail.com> <20260212001359.97296-28-jim.cromie@gmail.com> <20260212001359.97296-29-jim.cromie@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This new test-fn runs 3 module/submodule modprobe scenarios, variously using both the generic dyndbg= modprobe arg, and the test-module's classmap-params to manipulate the test-mod*'s pr_debugs. In all cases, the current flag-settings are counted and tested vs expectations. The 3rd scenario recapitulates the DRM_USE_DYNAMIC_DEBUG=y failure. 1. 2 modprobes (super then sub), with separate dyndbg=class-settings check module specific flag settings 2. modprobe submod, supermod is auto-loaded set supermod class-params check expected enablements in super & submod 3. modprobe super, with param=setting (like drm.debug=0x1ef) modprobe submod validate submod's class'd pr_debugs get properly enabled The test uses multi-queries, with both commas and percents (to avoid spaces and quoting). This is the main reason the test wasn't earlier in the patchset, closer to the classmap patches its validating. With some tedium, the tests could be refactored to split out early tests which avoid multi-cmds, and test only the class-params. Reviewed-by: Louis Chauvet Signed-off-by: Jim Cromie --- .../dynamic_debug/dyndbg_selftest.sh | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh index 513f6cb1db1d..09937dca3056 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -279,10 +279,83 @@ function test_percent_splitting { ifrmmod test_dynamic_debug } +function test_mod_submod { + echo -e "${GREEN}# TEST_MOD_SUBMOD ${NC}" + if [ $LACK_TMOD -eq 1 ]; then + echo "SKIP - test requires test-dynamic-debug.ko" + return + fi + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug + ddcmd =_ + + # modprobe with class enablements + modprobe test_dynamic_debug \ + dyndbg=class,D2_CORE,+pf%class,D2_KMS,+pt%class,D2_ATOMIC,+pm + + check_match_ct '\[test_dynamic_debug\]' 23 -r + check_match_ct =pf 1 + check_match_ct =pt 1 + check_match_ct =pm 1 + + modprobe test_dynamic_debug_submod + check_match_ct test_dynamic_debug_submod 23 -r + check_match_ct '\[test_dynamic_debug\]' 23 -r + check_match_ct test_dynamic_debug 46 -r + + # no enablements propagate here + check_match_ct =pf 1 + check_match_ct =pt 1 + check_match_ct =pm 1 + + # change classes again, this time submod too + ddcmd class,D2_CORE,+mf%class,D2_KMS,+lt%class,D2_ATOMIC,+ml "# add some prefixes" + check_match_ct =pmf 1 + check_match_ct =plt 1 + check_match_ct =pml 1 + # submod changed too + check_match_ct =mf 1 + check_match_ct =lt 1 + check_match_ct =ml 1 + + # now work the classmap-params + # fresh start, to clear all above flags (test-fn limits) + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug + modprobe test_dynamic_debug_submod # get supermod too + + echo 1 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits + echo 4 > /sys/module/test_dynamic_debug/parameters/p_level_num + # 2 mods * ( V1-3 + D2_CORE ) + check_match_ct =p 8 + echo 3 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits + echo 0 > /sys/module/test_dynamic_debug/parameters/p_level_num + # 2 mods * ( D2_CORE, D2_DRIVER ) + check_match_ct =p 4 + echo 0x16 > /sys/module/test_dynamic_debug/parameters/p_disjoint_bits + echo 0 > /sys/module/test_dynamic_debug/parameters/p_level_num + # 2 mods * ( D2_DRIVER, D2_KMS, D2_ATOMIC ) + check_match_ct =p 6 + + # recap DRM_USE_DYNAMIC_DEBUG regression + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug + # set super-mod params + modprobe test_dynamic_debug p_disjoint_bits=0x16 p_level_num=5 + check_match_ct =p 7 + modprobe test_dynamic_debug_submod + # see them picked up by submod + check_match_ct =p 14 + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug +} + tests_list=( basic_tests + # these require test_dynamic_debug*.ko comma_terminator_tests test_percent_splitting + test_mod_submod ) # Run tests -- 2.53.0