From nobody Mon Feb 9 12:25:16 2026 Received: from mail-oi1-f182.google.com (mail-oi1-f182.google.com [209.85.167.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1496E30FC13 for ; Wed, 14 Jan 2026 02:00:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.182 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768356039; cv=none; b=EnLKzJcYrGNBCz3KY0M7s+kkWF50xOmqM5FJHWe6x2YaWqEJXpOYk2OzjXlf//v0TopVj2oVH5Z20pzUO7VbUf5tka5yHl2Qe3kck4EFBi2F/XNKqSmadLZDFbxSv/8wrYW6GkqlapF95QKtN4QrT/7XlncGzWtqNA+cZWf8dcU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768356039; c=relaxed/simple; bh=Y6op64SH3HVRwLLGtoxME3mldm3/W0c1FqQmgPaP16k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=hlW7K+xghsE1rnh0xxsCPyA5TG7av0f4UR0rmvMditt/BZ2h2vvp18EeoJlvuyXTAnBjrFL8n2FD1fCbag2BnMlo9gXd8KDdal8WNPA02yGw8uwX9sxxuzCQD4cBPqEs2fBjUvSM5C294o3ERqEMBSXSQzlsgt7NckS3Q76Fu5I= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=nYXGM8RH; arc=none smtp.client-ip=209.85.167.182 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="nYXGM8RH" Received: by mail-oi1-f182.google.com with SMTP id 5614622812f47-45a7db48c57so3378860b6e.2 for ; Tue, 13 Jan 2026 18:00:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768356037; x=1768960837; darn=vger.kernel.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=M3hNaVpAB+vi7bZ5p4r2BEr0xFTlYHYJVlfyEjZdNd0=; b=nYXGM8RHTeOBYjUFRG1DXn/1gdgzU6y1E1aRq8u4ksASTpidCfCqG7rtCpKepO7iDu Ch4uiXWXg3zT61tK71VTY/uFpjtspAn1XUTFHKA8QRgJvcpiNn8kPd1lrK9D5weqHJti /ua2yO7M52QFR63ompFgfiUhHfSiXkHWKWFgs/pZ04wcvdk+gAg3z4rQQOQT25SvaPNF fBksaQLVd6MjzlilWdQYHAtYHEF3hsL7rBlI8R2MzNXV9udYUOwKPDa2S5AMoiOxBpBZ RYXpIUuSqmW3xv2L+crf2eWlxrMJ0LhmsAtV+Cd6GVX0VJt/4mC8rAN/xIxXos+QSNi6 dCzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768356037; x=1768960837; 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=M3hNaVpAB+vi7bZ5p4r2BEr0xFTlYHYJVlfyEjZdNd0=; b=D0nc+H0vnfV62z0lbJ3RJQsscfMnXlkiELB+1k4TwLQttKiWlZnGYAhIbBE2RFOqjH mqrjwOASufQrqd0st4yTlhHCjNpRdhHTMPMzivDgZ0JD3rpDJxGM/R140p3y4Dl/ome4 Ie4DdQnzJY5Q+mZxX6Nlz2/HTkKqzg/6q/SReuam8NcOCuvOb7PyhLctJ30CiC+8gZn0 n7M3GHG7jMlilWUjHzmCcW3fAH11Rvkv8FJBMsV2u+XEagEDvkLBeKV5jkCS/6SVk0/1 hWNeQ928gkcjOSlAwemkcIQTZMDF2VgVQY+Xxn4zv8x9MNzfseEgm+VsgXAQ19nM4PPN TLOA== X-Forwarded-Encrypted: i=1; AJvYcCVFbpxQkxwqp7IrmirbyVHplfiJmurUh328mZ+YTkuihuAbqZyX/PuWz/VAWacotwBpYfu9o3XDVlr7Gw8=@vger.kernel.org X-Gm-Message-State: AOJu0YwcAQuT/n7iWRpovOdELiAw8FadERnL6ly/rtf6uFqUltvbgTyw 6pi2PIJcBcHzfzOlXiKnIeXEL2+Jb229Jh7dyR45H/6frgp+CiE9+YRY X-Gm-Gg: AY/fxX5HhBN4jOsmmXeL0G/9pPXa7qLGkKiu3/cMsG4nSIvWXH4RONL1b67eBWJglvM MnuH34Xn4DA3X7FMkaGYyY4uVSyM+lO2MGR5ECHQxdxUB9zrdAzAiayb+dQUxS1JCHwkaHuXcpG mxpBQajIzCpP0kbCiewrCLsNvPN61NOIG+hi7lD5aecXCXvwi7ovGicmlMR4obIz47vp2fXEwGk kjzIjhH0tjBWCw8QRvF6Z1di6CmJ16ThJMDKXaJ0OziAWDIoyFP1rj+I9H8hnpeGEgBz6wIi30u GVCIapYaFgBVvkDWxTxvjyGRTWzx//QLEY9SgxqdiCTVRb+YNgh4R2/yx13Y+wwAyIxUdTA2DxU p0N/VfrWITkSEXD/K0gN9f6sl5HgG4dJhYIAlqW7zWmghG/y+cpiXu25fMpEjvULYHgWhidAxUX VPsrg85IKpU9jDsUY4r5yr6nsXPK3RoKonNpa9hoy80DIWHYs= X-Received: by 2002:a05:6808:178c:b0:45a:55e6:12aa with SMTP id 5614622812f47-45c7157ac7emr579179b6e.53.1768356036240; Tue, 13 Jan 2026 18:00:36 -0800 (PST) Received: from frodo (c-98-38-17-99.hsd1.co.comcast.net. [98.38.17.99]) by smtp.googlemail.com with ESMTPSA id 5614622812f47-45a5e2894e0sm10347195b6e.13.2026.01.13.18.00.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 18:00:35 -0800 (PST) From: Jim Cromie To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: Jim Cromie , Jason Baron , =?UTF-8?q?=C5=81ukasz=20Bartosik?= , Louis Chauvet , Bagas Sanjaya , Dave Airlie , Daniel Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , dri-devel@lists.freedesktop.org, Petr Mladek , Shuah Khan , linux-doc@vger.kernel.org, Steven Rostedt , "Liam R. Howlett" Subject: [PATCH v8 28/31] selftests-dyndbg: add test_mod_submod Date: Tue, 13 Jan 2026 18:57:44 -0700 Message-ID: <20260114015815.1565725-29-jim.cromie@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260114015815.1565725-1-jim.cromie@gmail.com> References: <20260114015815.1565725-1-jim.cromie@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This new test-fn runs 3 module/submodule modprobe scenarios, variously using both the generic dyndbg=3D 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=3Dy failure. 1. 2 modprobes (super then sub), with separate dyndbg=3Dclass-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=3Dsetting (like drm.debug=3D0x1ef) 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/too= ls/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 } =20 +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 =3D_ + + # modprobe with class enablements + modprobe test_dynamic_debug \ + dyndbg=3Dclass,D2_CORE,+pf%class,D2_KMS,+pt%class,D2_ATOMIC,+pm + + check_match_ct '\[test_dynamic_debug\]' 23 -r + check_match_ct =3Dpf 1 + check_match_ct =3Dpt 1 + check_match_ct =3Dpm 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 =3Dpf 1 + check_match_ct =3Dpt 1 + check_match_ct =3Dpm 1 + + # change classes again, this time submod too + ddcmd class,D2_CORE,+mf%class,D2_KMS,+lt%class,D2_ATOMIC,+ml "# add so= me prefixes" + check_match_ct =3Dpmf 1 + check_match_ct =3Dplt 1 + check_match_ct =3Dpml 1 + # submod changed too + check_match_ct =3Dmf 1 + check_match_ct =3Dlt 1 + check_match_ct =3Dml 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 =3Dp 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 =3Dp 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 =3Dp 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=3D0x16 p_level_num=3D5 + check_match_ct =3Dp 7 + modprobe test_dynamic_debug_submod + # see them picked up by submod + check_match_ct =3Dp 14 + ifrmmod test_dynamic_debug_submod + ifrmmod test_dynamic_debug +} + tests_list=3D( basic_tests + # these require test_dynamic_debug*.ko comma_terminator_tests test_percent_splitting + test_mod_submod ) =20 # Run tests --=20 2.52.0