Received: by 2002:ab2:6816:0:b0:1f9:5764:f03e with SMTP id t22csp455233lqo; Thu, 16 May 2024 10:49:55 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXOctrbAxMMR1+1HuOqr1/kBokUL0NRayyx52fYXOSQwGVp4T1jFnoH/3wSYBpFhWiFpTMH6LRRfqD1eszDaCnL8vm826ovvfUB4fbmNw== X-Google-Smtp-Source: AGHT+IH4v1xTJxEC+a12ABl3s9TQY3uLVcAc8+KNNxvqNEzhT6qefUr5b5bLj46JfOI9E1MN25VB X-Received: by 2002:a05:6512:3f1f:b0:51b:6f06:92f2 with SMTP id 2adb3069b0e04-5220fb78815mr15015510e87.33.1715881795340; Thu, 16 May 2024 10:49:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715881795; cv=pass; d=google.com; s=arc-20160816; b=DcfolsEk4ZcC0Evt20QMGsw9opD2r6ZaTRDLn+kkd92uEgldny+kgDDp60SPOTz4pr Rx8P4e8YAiRO0tmSZpfVDiAtzteoI6f4gZuoCOpu880Bgmg/GHwxKARDRszsJj6EhhZ7 ZC3idqVKrHQQe+IEgdjf1mvWMnwdV9tUmq4fJjzJQqriQc0f0FoO5D3gpP2+N3hLHrwD kkkItG4pCOfh2rPWIFX/QuELfQGe/sP+pbbfSsBzzf3DW6qKsv39cSEDjXa1i+k34Uw1 Dnx0OYBsbIeUBkFUBK22q/bcklkSe8H4TlQfYVl04rxhNEk8dpvczwqY/yZRnX05TXlL DPxw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=kQclGL1ogQugraKRSVgZd3GtxTAEOo7GMTSerjU8loE=; fh=K7GROKbm4rs8lxtmQD3H8PiL4mRblcBEjl+M9E6CYYw=; b=a6gMAO1J9ibe1uuetCXOQXK3gMUb1hcrok7mpYt8p5evqeXE3czISrQ1ivVGg0FzQf o1zvmKDi6olFyeJ9e9GGdZxxr1pNjbnqNHkJSmLFRoUxO2vBW6xRmgx0X/DSCbkAIZ3b 24kpS1lDDVn+NgqoWQEJy+3boqOUnr6C3THvOUh7n7rkUNIZs/0h20cXIvAaSbMiFAl7 KMId0PFZYygDGOy2KT4em0wcXrNSpx1QyhGfeTJRvct8VpnWfvbxnRUnmEiwIJzKYE/o OeyLNLQrLp001nBrBpPb5J8cXrDZZRyc4Iwuf1XuXlgrUTRPX01axi6RmBQHVcNLJ4TW yBvw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="bT/Btldx"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-5733c36e35bsi9012773a12.554.2024.05.16.10.49.55 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 10:49:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-181408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="bT/Btldx"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-181408-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-181408-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id D5EEC1F21FE0 for ; Thu, 16 May 2024 17:49:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F0EB715B996; Thu, 16 May 2024 17:45:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bT/Btldx" Received: from mail-io1-f44.google.com (mail-io1-f44.google.com [209.85.166.44]) (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 CC3AA15B128 for ; Thu, 16 May 2024 17:45:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715881512; cv=none; b=Y8/DN+RoRvBQLMLFtoi1ioctUEA84W1mzp8WO71TNeJJoMtri5kL/mAMYBDnQbTE4oBXLgDFp+sjR8OItksTU9QnBYBN5MBzHW/PUjk44IXaBZ1Zv1SmE/OEkvqLAirKKoxk1MJO042Cqv2jXSSCgApMgDTgnd1PzYpDpLosdBo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715881512; c=relaxed/simple; bh=zk0FpkXNzqEU6+hdkM4mtB3nxolyva27iHEVE5qQYEM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=BbwTJNKMslD+SDfqYUpwhADx3vfUsiaVGj4eH9aPRHDGlaL5F6Mx39VTd92zr9ryuFVUhmBVt+5lAEAdNN2oEehP9eDm/GstDl+3ZRj9WQFCUubwpB1EzIlEy3xK7WsbIy6++QVNUhyXthH5aoLNWZFvmJjAx71FgzvG9fnnBkg= 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=bT/Btldx; arc=none smtp.client-ip=209.85.166.44 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 Received: by mail-io1-f44.google.com with SMTP id ca18e2360f4ac-7e21b6e98bdso47424039f.0 for ; Thu, 16 May 2024 10:45:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1715881509; x=1716486309; 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=kQclGL1ogQugraKRSVgZd3GtxTAEOo7GMTSerjU8loE=; b=bT/BtldxibIl458txGpQ2Z+mp23Uo4NX1uGh5ZCVUBMRKzQ6oNMyrhaX15mcs5bzXT sL4e0Bsepux8K8JsJkoNA+NOMQwhoXXDkinMfPB2gwuiiyXrkRIdNur9VliA3MY9FacG +UAvGCbfYvLTU2dmgrgYDwlA5xnblC22IV0024DFYGX1K7WxiwZaD9vhEig1bB4CsCCs XMNDP+CmCiMfiuqx++2OFZxL673HJM1Zg1azyso/iArnwxnyVCYGxqW30P2UGRneIpco nYUe30r8zPAkVyLeGy4QdfvY86iyhupdsZSAS/IWK5MwvXuB7hNzi9iR3sp+YQjZE6sm Mguw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715881509; x=1716486309; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kQclGL1ogQugraKRSVgZd3GtxTAEOo7GMTSerjU8loE=; b=vCde7Vep1FaWYNRVxM+81YPJd88xAeC8bHiB8rNgGjaztcdm2Nfx7XM6E70etzGDMZ dGxh6j8aD2N/f83514xed9W7duIyJoqIEA9ZZAWvqFM4agjFfzwkA4bCEwz06bz+2P7P QhHHhJhF0qjj5NrcQDCNHL4OpYIdZIv73jgJNWsSv0tYs+RcZfcyKhGPTf4cqPKkw/FG WM6oNQ4mjaq7+ekZSmw+ckdmw9r8sEI9EeLZoc3zQefDSqw5X/42CubofqCWS6FK3g9/ DwdHt38VnCgfXHvGlGCLjiS1gR8Lxl89TKNTugxN9FxiTpdAaUUsb8DwTM+51wOl4Bha jjhg== X-Forwarded-Encrypted: i=1; AJvYcCVbomVRTldrskMNxQPIIZJx9RXY/4OsZeMiEjY/N4ZOY3kRAA7KtwtM1BQPVfOVYnip5CQJipnnJoaPkB8fsAhAMco8PfByR1JW+Idx X-Gm-Message-State: AOJu0Yyd63ZnmlelOFMj1Hz3xECcsTp+UVLGjyg4PNfrMQXP4hKHhZIb nRegWP3u8vLwh4c5sxl13dJalLz6HlNUsaVztREQqWZQoJQ/jS0e X-Received: by 2002:a05:6602:12:b0:7e1:542d:7b09 with SMTP id ca18e2360f4ac-7e1b501a196mr2117867339f.0.1715881508874; Thu, 16 May 2024 10:45:08 -0700 (PDT) Received: from frodo.. (c-73-78-62-130.hsd1.co.comcast.net. [73.78.62.130]) by smtp.googlemail.com with ESMTPSA id 8926c6da1cb9f-4893715057csm4273595173.80.2024.05.16.10.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 May 2024 10:45:08 -0700 (PDT) From: Jim Cromie To: jbaron@akamai.com, gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org Cc: ukaszb@chromium.org, linux@rasmusvillemoes.dk, joe@perches.com, mcgrof@kernel.org, daniel.vetter@ffwll.ch, tvrtko.ursulin@linux.intel.com, jani.nikula@intel.com, ville.syrjala@linux.intel.com, seanpaul@chromium.org, robdclark@gmail.com, groeck@google.com, yanivt@google.com, bleung@google.com, Jim Cromie Subject: [PATCH v8-RESEND 26/33] selftests-dyndbg: test dyndbg-to-tracefs Date: Thu, 16 May 2024 11:43:50 -0600 Message-ID: <20240516174357.26755-27-jim.cromie@gmail.com> X-Mailer: git-send-email 2.45.0 In-Reply-To: <20240516174357.26755-1-jim.cromie@gmail.com> References: <20240516174357.26755-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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a series of trace-tests: test_actual_trace() etc, to validate that the dyndbg-to-tracefs feature (using +T flag) works as intended. The 1st test uses the global tracebuf, the rest use/excercise private tracebufs. These tests are currently optional, via "TRACE" arg1, because the feature code is in-the-lab. But its an objective test, and pretty user-interface oriented. IOW this passes: :#> ./tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh but this fails: :#> ./tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh TRACE So its won't break selftests success. This allows the patch to be committed now w/o inducing selftest failures, and the tests enabled later, with the promised code. Signed-off-by: Jim Cromie Co-developed-by: Łukasz Bartosik Signed-off-by: Łukasz Bartosik --- .../dynamic_debug/dyndbg_selftest.sh | 435 ++++++++++++++++++ 1 file changed, 435 insertions(+) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh index 54acee58cb4e..65f31418870f 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -308,6 +308,405 @@ function test_mod_submod { check_match_ct =p 14 -v } +# tests below here are all actually using dyndbg->trace, +# and verifying the writes + +function test_actual_trace { + echo -e "${GREEN}# TEST_ACTUAL_TRACE ${NC}" + ddcmd =_ + echo > /sys/kernel/tracing/trace + echo 1 >/sys/kernel/tracing/tracing_on + echo 1 >/sys/kernel/tracing/events/dyndbg/enable + modprobe test_dynamic_debug dyndbg=class,D2_CORE,+T:0 + search_trace "D2_CORE msg" + search_trace_name 0 1 "D2_CORE msg" + check_match_ct =T 1 + tmark "trace-mark" + search_trace "trace-mark" + doprints + search_trace "D2_CORE msg" + ifrmmod test_dynamic_debug +} + +function self_start { + echo \# open, modprobe +T:selftest + ddcmd open selftest + check_trace_instance_dir selftest 1 + is_trace_instance_opened selftest + modprobe test_dynamic_debug dyndbg=+T:selftest.mf + check_match_ct =T:selftest.mf 5 +} + +function self_end_normal { + echo \# disable -T:selftest, rmmod, close + ddcmd module test_dynamic_debug -T:selftest # leave mf + check_match_ct =:selftest.mf 5 -v + ddcmd module test_dynamic_debug +:0 + ddcmd close selftest + is_trace_instance_closed selftest + ifrmmod test_dynamic_debug +} + +function self_end_disable_anon { + echo \# disable, close, rmmod + ddcmd module test_dynamic_debug -T + check_match_ct =:selftest.mf 5 + ddcmd module test_dynamic_debug +:0 + ddcmd close selftest + is_trace_instance_closed selftest + ifrmmod test_dynamic_debug +} + +function self_end_disable_anon_mf { + echo \# disable, close, rmmod + ddcmd module test_dynamic_debug -Tf + check_match_ct =:selftest.m 5 + ddcmd module test_dynamic_debug +:0 + ddcmd close selftest + is_trace_instance_closed selftest + ifrmmod test_dynamic_debug +} + +function self_end_nodisable { + echo \# SKIPPING: ddcmd module test_dynamic_debug -T:selftest + ddcmd close selftest fail # close fails because selftest is still being used + check_err_msg "Device or resource busy" + check_match_ct =T:selftest.mf 5 + rmmod test_dynamic_debug + ddcmd close selftest # now selftest can be closed because rmmod removed + # all callsites which were using it + is_trace_instance_closed selftest +} + +function self_end_delete_directory { + del_trace_instance_dir selftest 0 + check_err_msg "Device or resource busy" + ddcmd module test_dynamic_debug -mT:selftest + check_match_ct =:selftest.f 5 + del_trace_instance_dir selftest 0 + check_err_msg "Device or resource busy" + ddcmd module test_dynamic_debug +:0 + ddcmd close selftest + check_trace_instance_dir selftest 1 + is_trace_instance_closed selftest + del_trace_instance_dir selftest 1 + check_trace_instance_dir selftest 0 +} + +function test_early_close () { + ddcmd open kparm_stream + ddcmd module usbcore +T:kparm_stream.mf + check_match_ct =T:usb_stream.mf 161 + echo ":not-running # ddcmd module usbcore -T:kparm_stream.mf" + ddcmd close kparm_stream +} + +function self_test_ { + echo "# SELFTEST $1" + self_start + self_end_$1 +} + +function cycle_tests_normal { + echo -e "${GREEN}# CYCLE_TESTS_NORMAL ${NC}" + self_test_ normal # ok + self_test_ disable_anon # ok + self_test_ normal # ok + self_test_ disable_anon_mf # ok +} + +function cycle_not_best_practices { + echo -e "${GREEN}# CYCLE_TESTS_PROBLEMS ${NC}" + self_test_ nodisable + self_test_ normal + self_test_ delete_directory +} + +# proper life cycle - open, enable:named, disable:named, close +function test_private_trace_simple_proper { + echo -e "${GREEN}# TEST_PRIVATE_TRACE_1 ${NC}" + # ddcmd close kparm_stream + ddcmd open kparm_stream + ddcmd module params +T:kparm_stream.mf + check_match_ct =T:kparm_stream.mf 4 + ddcmd module params -T:kparm_stream.mf + check_match_ct =T:kparm_stream.mf 0 + is_trace_instance_opened kparm_stream + ddcmd module params +:0 + ddcmd close kparm_stream + is_trace_instance_closed kparm_stream + ddcmd =_ + check_trace_instance_dir kparm_stream 1 + is_trace_instance_closed kparm_stream + del_trace_instance_dir kparm_stream 1 + check_trace_instance_dir kparm_stream 0 +} + +function test_private_trace_2 { + echo -e "${GREEN}# TEST_PRIVATE_TRACE_2 ${NC}" + ddcmd =_ + echo > /sys/kernel/tracing/trace + echo 1 >/sys/kernel/tracing/tracing_on + echo 1 >/sys/kernel/tracing/events/dyndbg/enable + ddcmd open foo + is_trace_instance_opened foo + check_trace_instance_dir foo 1 + + modprobe test_dynamic_debug + ddcmd class,D2_CORE,+T:foo.l,%class,D2_KMS,+fT:foo.ml + check_match_ct =T:foo.l 1 + check_match_ct =T:foo.mfl 1 + + # purpose ? + echo 1 >/sys/kernel/tracing/tracing_on + echo 1 >/sys/kernel/tracing/events/dyndbg/enable + + tmark test_private_trace about to do_prints + search_trace "test_private_trace about to do_prints" + search_trace_name "0" 1 "test_private_trace about to do_prints" + + doprints + ddcmd class,D2_CORE,-T:foo + ddcmd close foo fail + check_err_msg "Device or resource busy" + ddcmd class,D2_KMS,-T:foo + ddcmd close foo + check_trace_instance_dir foo 1 + is_trace_instance_closed foo + ddcmd close bar fail + check_err_msg "No such file or directory" + ifrmmod test_dynamic_debug + search_trace_name foo 2 "D2_CORE msg" + search_trace_name foo 1 "D2_KMS msg" + del_trace_instance_dir foo 1 + check_trace_instance_dir foo 0 +} + +function test_private_trace_3 { + echo -e "${GREEN}# TEST_PRIVATE_TRACE_3 ${NC}" + ddcmd =_ + echo > /sys/kernel/tracing/trace + echo 1 >/sys/kernel/tracing/tracing_on + echo 1 >/sys/kernel/tracing/events/dyndbg/enable + ddcmd open foo \; open bar + is_trace_instance_opened foo + is_trace_instance_opened bar + modprobe test_dynamic_debug + ddcmd class,D2_CORE,+T:foo + ddcmd class,D2_KMS,+T:foo + ddcmd class D2_CORE +T:foo \; class D2_KMS +T:foo + ddcmd "class,D2_CORE,+T:foo;,class,D2_KMS,+T:foo" + ddcmd class,D2_CORE,+T:foo\;class,D2_KMS,+T:foo + check_match_ct =T 2 -v + check_match_ct =Tl 0 + check_match_ct =Tmf 0 + echo 1 >/sys/kernel/tracing/tracing_on + echo 1 >/sys/kernel/tracing/events/dyndbg/enable + tmark test_private_trace_2 about to do_prints + doprints + rmmod test_dynamic_debug + ddcmd "close bar;close foo" + is_trace_instance_closed bar + is_trace_instance_closed foo + search_trace_name foo 2 "D2_CORE msg" + search_trace_name foo 1 "D2_KMS msg" + del_trace_instance_dir foo 1 + check_trace_instance_dir foo 0 + search_trace "test_private_trace_2 about to do_prints" + del_trace_instance_dir bar 1 + check_trace_instance_dir bar 0 +} + +function test_private_trace_4 { + echo -e "${GREEN}# TEST_PRIVATE_TRACE_4 ${NC}" + ddcmd =_ + echo > /sys/kernel/tracing/trace + echo 1 >/sys/kernel/tracing/tracing_on + echo 1 >/sys/kernel/tracing/events/dyndbg/enable + + ddcmd open foo + modprobe test_dynamic_debug dyndbg=class,D2_CORE,+T:foo%class,D2_KMS,+T:foo + check_match_ct =Tl 0 + check_match_ct =Tmf 0 + check_match_ct =T 2 + + # are these 2 doing anything ? + echo 1 >/sys/kernel/tracing/tracing_on + echo 1 >/sys/kernel/tracing/events/dyndbg/enable + + tmark should be ready + search_trace_name "0" 0 "should be ready" # in global trace + + doprints + search_trace_name foo 2 "D2_CORE msg" # in private buf + search_trace_name foo 1 "D2_KMS msg" + + # premature delete + del_trace_instance_dir foo 0 + check_trace_instance_dir foo 1 # doesn't delete + ifrmmod test_dynamic_debug + + ddcmd "close foo" + is_trace_instance_closed foo + del_trace_instance_dir foo 1 # delete works now + + check_trace_instance_dir foo 0 + search_trace "should be ready" +} + +# $1 - trace-buf-name (or "0") +# $2 - reference-buffer +function search_in_trace_for { + bufname=$1; shift; + ref=$2; + ref2=$(echo $ref | cut -c20-) + echo $ref2 +} + +function test_private_trace_mixed_class { + echo -e "${GREEN}# TEST_PRIVATE_TRACE_5 ${NC}" + ddcmd =_ + ddcmd module,params,+T:unopened fail + check_err_msg "Invalid argument" + is_trace_instance_closed unopened + check_trace_instance_dir unopened 0 + + ddcmd open bupkus + is_trace_instance_opened bupkus + check_trace_instance_dir bupkus 1 + modprobe test_dynamic_debug \ + dyndbg=class,D2_CORE,+T:bupkus.mf%class,D2_KMS,+T:bupkus.mf%class,V3,+T:bupkus.mf + + # test various name misses + ddcmd "module params =T:bupkus1" fail # miss on name + check_err_msg "Invalid argument" + ddcmd "module params =T:unopened" fail # unopened + check_err_msg "Invalid argument" + + ddcmd "module params =mlfT:bupkus." # we allow dot at the end of flags + ddcmd "module params =T:bupkus." + ddcmd "module params =:bupkus." + ddcmd "module params =:0." + + check_match_ct =T:bupkus.mf 3 # the 3 classes enabled above + # enable the 5 non-class'd pr_debug()s + ddcmd "module test_dynamic_debug =T:bupkus" + check_match_ct =T:bupkus 8 -r # 8=5+3 + + doprints + ddcmd close,bupkus fail + check_err_msg "Device or resource busy" + ddcmd "module * -T:0" # misses class'd ones + ddcmd close,bupkus fail + + ddcmd class,D2_CORE,-T:0%class,D2_KMS,-T:0%class,V3,-T:0 # turn off class'd and set dest to 0 + ddcmd close,bupkus + is_trace_instance_closed bupkus + + # check results + eyeball_ref=<