From patchwork Sat Feb 10 23:50:01 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?=C5=81ukasz_Bartosik?= X-Patchwork-Id: 199356 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1704911dyd; Sat, 10 Feb 2024 16:06:30 -0800 (PST) X-Google-Smtp-Source: AGHT+IF/E97IrFdAIdnQIPD/iUBi+im+J8qizz4RdihDdd8C+w3U94qfLYwqbteChLBOkxFAc0Fw X-Received: by 2002:a17:907:9849:b0:a38:8f85:35b0 with SMTP id jj9-20020a170907984900b00a388f8535b0mr2089153ejc.16.1707609990295; Sat, 10 Feb 2024 16:06:30 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707609990; cv=pass; d=google.com; s=arc-20160816; b=QP2D/QwTidJhe3HvqfL2GFE/j5lWqknWb5PohvR39zvJHP2eYYtznfbX/+etW2Ulvm AnlQJLs/prKWr93Ue8M9g4FAc7RCee8B8xj9UZ5ayc7FV+Zs2J/TSbGx7VZsy71QeQfI lEDnZISsZjGWhb64GkHel1SATifgLiSQOa8gBYn/gt0jU1XalTRGHw5vhoUgtPWGaN3G zFXlzPmjTXyy94vYrd9CmvmgKiiSGEW1fnj4MCyeMgkeoNflHG7GXV65lb/vQYU2kfnh jPd31LUFlT41yW2UL/c0iAFoeJ1aYJkvw8yfnCPkE9n0QHiC1+W+Fpzon/rxB2vaJqvE 4NKg== 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=Tkxos9dGgcrWJ0r2tCur5eWGm4CQktOnj9qwMEqGt1o=; fh=sD+A71HJXZFL3JPzcs0ZgBrDqoSfEMc133fmOi17epw=; b=Q0Qw4Ire/RRhQUXeSdlIIHwxXjUwG4eSMmzrmO1I5Ri4/mGQKOPfMnTco3TUdiQOQf P2F3s0u13C3yXR+3ttk5Eg89YS2jN4oG2NqOSfYiTxUWDageZHDdH8/3jM+1oxcfeU8P 91z40qsPs0F0dyhrI60zE+NxzXDseMKIV6zK3Rm9rApNpu41TjxP9wGrWJwWSH5L5qic oVdgDT+1GDlIHv+IUvSXgR/+c8q3L5yQrMIOGV7h4kKsPM6Kg6C00AlQCKKEx96YX0s/ m1fkdjdZLxuJofl65XM8TYqtgjHrq2qYkWSqTSxcHpupEQd915PuAb53mULDrwZktYSM JBeg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=KfBax3v6; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-60614-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60614-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org X-Forwarded-Encrypted: i=2; AJvYcCUDrsOoWLjCRmDhgksYcQdLqkCWKAGcR4Glqcx3hndoS/Qy6WDYqCSkyLm44PB1MoRLoS0NCmAMjaexRigYN2Wbrn+Djg== Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id xa18-20020a170907b9d200b00a3c10d96734si1551069ejc.470.2024.02.10.16.06.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 16:06:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60614-ouuuleilei=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=@chromium.org header.s=google header.b=KfBax3v6; arc=pass (i=1 spf=pass spfdomain=chromium.org dkim=pass dkdomain=chromium.org dmarc=pass fromdomain=chromium.org); spf=pass (google.com: domain of linux-kernel+bounces-60614-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60614-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org 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 823711F27BAC for ; Sat, 10 Feb 2024 23:58:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 92D03657C1; Sat, 10 Feb 2024 23:51:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="KfBax3v6" Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) (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 057396351E for ; Sat, 10 Feb 2024 23:51:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.67 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707609084; cv=none; b=CVJT3p6Wkde9JNKY1DX4CpLoRbjcfGJvsrEOjY4XPPuFzyClAtcP6nRMtL8Lgz8DbWpVRJm5Mat75cXXVsgYbRmwRKFSa9mOVNKLIHX8MTvbEEcYCxBfBwmnMoymT/tZiqbyVsdwcGlnEn0vNBYXEijKcyKGioiTCHGE06Vgfio= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707609084; c=relaxed/simple; bh=f4Sac4mEUw0BI5hmgTH6/Jq4sbbkpzY9eNebwB4W+sQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VyCu+/cHAw/F+MBv6QIi0YsLw2ErTGtzG6zCnRreuN9qIyrSGCJ9oTeE9OLvOfM6pDInoddeKP3Sk1Omlg3E2klaVf9MOsq1KYzCyfwH3yiyaNLoqeTC4ki08mOyuHUYlCYLf9Ij3byCqsaEa3AT6yznW0x0R0XGFr0Vmb2talI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org; spf=pass smtp.mailfrom=chromium.org; dkim=pass (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b=KfBax3v6; arc=none smtp.client-ip=209.85.167.67 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=chromium.org Received: by mail-lf1-f67.google.com with SMTP id 2adb3069b0e04-51147d0abd1so2384698e87.1 for ; Sat, 10 Feb 2024 15:51:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1707609081; x=1708213881; 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=Tkxos9dGgcrWJ0r2tCur5eWGm4CQktOnj9qwMEqGt1o=; b=KfBax3v623Qv6y2xTCsNLAtCXVY1WlBtL/6MK6mPY0UX13LY9E7yxVD80Rm0y4/TNs XOUGfbAy7WxRlmiRVHaZOwYbTrRjXYqj8UDD09NDr/PGocuMtrDl5gjC6CqzW/7h/rLt 8CKaNdkFXph+Ptft3/wrTiTNxr5oiUrXZBCeo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1707609081; x=1708213881; 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=Tkxos9dGgcrWJ0r2tCur5eWGm4CQktOnj9qwMEqGt1o=; b=IK2nzkBYlTo0R2GWgLoEdWCLJwAOaDkz/cW882CwzI3yEN2YywsqMOYGng15Y8VLXV IuLikfKdBCkwEInYs9G5eK80hH+x02zqhDjL/bo1QahTdP1t7yYa4ScZeioT945qEdbM 9zJNeB4La8voeZN5SotHXo4NOx6NNDvHE3PjEgtTkU9PPLYYr7ZGIB2iwlmFXvqTF7YU uWpAVqGsb58bHfaLsGGnu2N9ckG/DOr1WKQt55PaC5pmCPVvWK5YnkwnGWy9wCALcSg3 WefXYmjhxeY4jB+RvOP1e98u4qVFRTyXWQompK9FUxrZbW41NbqnbTUpn39wooyApa4H SIgg== X-Gm-Message-State: AOJu0Yw4iMC0l6hkScH3+s7nRDl5LBa1UG4g7OMICBPCa9BtrfPvU7uq vKzQ7gDtILupMARqBskVUvJbWGnwzAOdA364fWSxW+ijn7Ye8beFVpdOoh0D X-Received: by 2002:a19:ca58:0:b0:511:79d4:fd3e with SMTP id h24-20020a19ca58000000b0051179d4fd3emr1597737lfj.34.1707609081180; Sat, 10 Feb 2024 15:51:21 -0800 (PST) X-Forwarded-Encrypted: i=1; AJvYcCWps1kpiiPoE6sKwfqYMp+1eXTYtkI0CSuKhz/AReokCMYcZhEKgLbWk0M85iO+BPvrbIcE1EZD323/fyqJE4HjkBNzLdwYDW8J6LsKmB7cK5Bc8z3hIWTcQVnB2aCjxd7EDUFxbyO9+ofJ5tm0VGy+CpAnFkkw3MMDVZ0w968O1DynVEr3W/wuycA4d/bShuIIFH7elM+AH/UC5e3nF04Rx/Wcp97XieL7pLqhmlb9MyRZhL9Vxhaf2n+x1ySra9VH0VSYG9ZXS4V7p9X3juk/8pm080j6HatMrsqzIWqgs2OIPdI6m+9Bk1KGLhg8DLPiEj3SrMvQsY3NQ71qb4N/cFY5WtOstTpgBYVZShOZW60J4xpZTRMbSYV7LjUxpDGe+MlQEpHoSoLlPg3aT4PKscPS3d6eVc96NGMKsiMbnXRWj5E0TpZkL4Wuy7Gluhktd/vnKPvEkvowR1O84kFzqJTGpbQi7r1xbSJwiJo9KfWVp2vBbOGYFynqkJCnXDamL2shwngnxh/xRDk29wZpIXfPU+vh36nwVjhJf8HQkYPUuvgY9KRjE/zjamRdvheQsBnsot+gTu7U81KBjzcWK4cTxfhQhxfRGFdRGgvBdtIuQA== Received: from ukaszb-l.roam.corp.google.com (alfa56.extreme-net.one.pl. [213.77.89.56]) by smtp.gmail.com with ESMTPSA id o27-20020a056512051b00b0051179ae1846sm365561lfb.280.2024.02.10.15.51.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 15:51:20 -0800 (PST) From: =?utf-8?q?=C5=81ukasz_Bartosik?= To: Jason Baron , Jim Cromie , Greg Kroah-Hartman , Andrew Morton , Kees Cook , Douglas Anderson Cc: Guenter Roeck , Yaniv Tzoreff , Benson Leung , Steven Rostedt , Vincent Whitchurch , Pekka Paalanen , Sean Paul , Daniel Vetter , Simon Ser , John Ogness , Petr Mladek , Sergey Senozhatsky , linux-kernel@vger.kernel.org, upstream@semihalf.com Subject: [PATCH v4 31/39] dyndbg-test: test_private_trace_mixed_class - parameterize modname Date: Sun, 11 Feb 2024 00:50:01 +0100 Message-ID: <20240210235009.2405808-32-ukaszb@chromium.org> X-Mailer: git-send-email 2.43.0.687.g38aa6559b0-goog In-Reply-To: <20240210235009.2405808-1-ukaszb@chromium.org> References: <20240210235009.2405808-1-ukaszb@chromium.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790558853115157148 X-GMAIL-MSGID: 1790558853115157148 From: Jim Cromie This fn currently is hard-coded to modprobe test_dynamic_debug.ko for its tests, we'd also like to use test_dynamic_debug_submod.ko. Add local modname="test_dynamic_debug" to make this explicit. This leaves the use of search_trace_name for hard-coded reference content, unfortunately that will take more fiddling. Signed-off-by: Jim Cromie --- .../dynamic_debug/dyndbg_selftest.sh | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh index d1f447eef4c0..abe94af0f3eb 100755 --- a/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh +++ b/tools/testing/selftests/dynamic_debug/dyndbg_selftest.sh @@ -499,7 +499,20 @@ function search_in_trace_for { } function test_private_trace_mixed_class { - echo -e "${GREEN}# TEST_PRIVATE_TRACE_5 ${NC}" + local modname="test_dynamic_debug" + echo -e "${GREEN}# TEST_PRIVATE_TRACE_mixed_class ${NC}" + + local eyeball_ref=<<'EOD' + modprobe-1173 [001] ..... 7.781008: 0: test_dynamic_debug:do_cats: test_dd: D2_CORE msg + modprobe-1173 [001] ..... 7.781010: 0: test_dynamic_debug:do_cats: test_dd: D2_KMS msg + modprobe-1173 [001] ..... 7.781010: 0: test_dynamic_debug:do_levels: test_dd: V3 msg + cat-1214 [001] ..... 7.905494: 0: test_dd: doing categories + cat-1214 [001] ..... 7.905495: 0: test_dynamic_debug:do_cats: test_dd: D2_CORE msg + cat-1214 [001] ..... 7.905496: 0: test_dynamic_debug:do_cats: test_dd: D2_KMS msg + cat-1214 [001] ..... 7.905497: 0: test_dd: doing levels + cat-1214 [001] ..... 7.905498: 0: test_dynamic_debug:do_levels: test_dd: V3 msg +EOD + ddcmd =_ ddcmd module,params,+T:unopened fail check_err_msg "Invalid argument" @@ -509,7 +522,7 @@ function test_private_trace_mixed_class { ddcmd open bupkus is_trace_instance_opened bupkus check_trace_instance_dir bupkus 1 - modprobe test_dynamic_debug \ + modprobe $modname \ dyndbg=class,D2_CORE,+T:bupkus.mf%class,D2_KMS,+T:bupkus.mf%class,V3,+T:bupkus.mf # test various name misses @@ -524,8 +537,7 @@ function test_private_trace_mixed_class { 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" + ddcmd "module $modname =T:bupkus" # enable the 5 non-class'd pr_debug()s check_match_ct =T:bupkus 8 -r # 8=5+3 doprints @@ -538,18 +550,6 @@ function test_private_trace_mixed_class { ddcmd close,bupkus is_trace_instance_closed bupkus - # check results - eyeball_ref=<