Received: by 2002:a05:7412:7c14:b0:fa:6e18:a558 with SMTP id ii20csp475387rdb; Mon, 22 Jan 2024 09:48:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IFlLqmbpKg9kCTzNOyAO7ib4ICm3mxVzeUGUL+2KZ57Z+M/rGXuqEiq7mszSFfM2KWeBBOo X-Received: by 2002:a05:651c:d1:b0:2cd:7357:58eb with SMTP id 17-20020a05651c00d100b002cd735758ebmr2065276ljr.39.1705945723716; Mon, 22 Jan 2024 09:48:43 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705945723; cv=pass; d=google.com; s=arc-20160816; b=XqJXlgDNMz9Y5RIJ+Q572HBVLRIRTp/+pfkI2//wi8ZaMbD5jpVWhM7fV+/U1+Yth9 gaiYfIfBslRUlsKMZ8UrmG7oTdgiaAAG3rekdyaVjy3NI8+KdUHE2t5QmZhY0gkwPCA7 hhO18vbYv0uxFG5KrlfXPrskUhXEH18SkhC1cSv1tU+s205R1PAA6E6dkd7Iln2NJO4+ tlXz1h5HGM3UIY+BdhcjjNrP/S5nIi6wQZZ9Ae34HacY2vkkNXYxO3t7wnJKEBOMZCz2 Jhu+FYrhRMRHoOfux0tqXM08XJAL7VyR7NtFCthzP0VI5c5db671zTFbnoXeARI79O++ wfRg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=hkDrMppdo2YSOStvhrrgCQNeZyenCLj61ibX++y7gX0=; fh=/nRO8ERNpUyoJu1NMPcsy5Lo1TtPrSPgCo2eAnr30iY=; b=jA889PSDyUOcT/d2NfuBzoJKD0SExgGRWtIr+G8NKn6TyUuN5ACVTGraEDbJrdnv1M +59BUSUWTrpY1VSN83oaQIajIZCRaN54zRCS0IFr7sYNR5WyRav8XEG6Y84ms/UVnQM0 pgLIXNa4Bo5mDxb3UXo8dJm16idgxnvdtw6Mk3taLzuFRPgOaY51lN9Z5QJm/dHt4WuP Y/0sKlJ1rBzDy7EQXkaUBSsyFRcXK0WWFIp0SpM6QbfGHP+GFwXGX2qEJJkB03YULMRa n968i8qW9qmGLHW6slSf+yckFLMQ6YJjeXBpeUpToJi2oGmNkssSiUSHzZUYK6VaXjFJ m+iw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=jhIFD7OI; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-33760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a2-20020a05640213c200b00558bd08ca48si10868391edx.321.2024.01.22.09.48.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 09:48:43 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33760-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=@intel.com header.s=Intel header.b=jhIFD7OI; arc=pass (i=1 spf=pass spfdomain=intel.com dkim=pass dkdomain=intel.com dmarc=pass fromdomain=intel.com); spf=pass (google.com: domain of linux-kernel+bounces-33760-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33760-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 7754A1F28859 for ; Mon, 22 Jan 2024 17:48:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B10054CB5E; Mon, 22 Jan 2024 17:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="jhIFD7OI" Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1FAF4CB47; Mon, 22 Jan 2024 17:14:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705943664; cv=none; b=LAjE762TUIvFfRuXM/2ll6rVajRzHcUDFuuzW0VqzQE1a3kaKXwdMy9vNPednB3Repv3+qAswWax/wthtEA2PXLZd80Skvu3MyVGySqekabKsPazSla5b2VPXfsitjpFO8gWoyi4hBlxKIV8hRnRtyt/twDEEs56Z+paVzv+tvs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705943664; c=relaxed/simple; bh=QzD4pwvbiYZ9itdJVQhid9o2mLBqbUNnCZYBsNS9LKg=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=Kfdxj2cuETX2FBX5fxfLAZQeIGi2QT4uW0VagsWltQEflNICX3AX2fTP5RSgtgnc5gU80N8b9gnloPjws4FzLADEiMuV7Jkzjk/0ojUTvHZgTUZM0bVbVaPVM6u5kzYiHl06OoRgLX3qsGYe9tLXPz6fSr5zFOADffM+qp62je4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=jhIFD7OI; arc=none smtp.client-ip=192.198.163.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1705943663; x=1737479663; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=QzD4pwvbiYZ9itdJVQhid9o2mLBqbUNnCZYBsNS9LKg=; b=jhIFD7OIN2p7EndLpaeFtoLulbLkfBLPjhpddSstnXK7j/8HA/iQG9bn H3oa2UF3Ef7eookiQCPq1TAYTBxjgnJSaiXyRDs9zWkKVMEY5ipmbuFc6 xghY2XR/8QiySIT9wArQtJnWSh0TXpY31AIAJSo7bk4ZKC3kN81Qoo9tm TG8gDTpVbxMR4/4M72tdRg5Xi9mujHVKdcBZwY5P1VYc+DUINFIefKZD8 f5xofdrDhpjjolG2v2mRqH0oeob1Wcu4Jp25j54LIUEbbM1UTCVa2D5JX c0HSgBNs3pHLagf6R4UxBnoCF8gZnUG7/cJaB0u+U2Sz/2diEkS7NZMwu Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10961"; a="8023203" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="8023203" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmvoesa103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 09:14:22 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10961"; a="735233041" X-IronPort-AV: E=Sophos;i="6.05,211,1701158400"; d="scan'208";a="735233041" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.196]) by orsmga003-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Jan 2024 09:14:21 -0800 From: Lucas De Marchi To: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org Cc: Lucas De Marchi , "Krzysztofik, Janusz" , Rae Moar , "David Gow" , Brendan Higgins , "intel-xe@lists.freedesktop.org" Subject: [PATCH v2] kunit: Mark filter* params as rw Date: Mon, 22 Jan 2024 09:14:08 -0800 Message-Id: <20240122171408.3328510-1-lucas.demarchi@intel.com> X-Mailer: git-send-email 2.40.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit By allowing the filter_glob parameter to be written to, it's possible to tweak the testsuites that will be executed on new module loads. This makes it easier to run specific tests without having to reload kunit and provides a way to filter tests on real HW even if kunit is builtin. Example for xe driver: 1) Run just 1 test # echo -n xe_bo > /sys/module/kunit/parameters/filter_glob # modprobe -r xe_live_test # modprobe xe_live_test # ls /sys/kernel/debug/kunit/ xe_bo 2) Run all tests # echo \* > /sys/module/kunit/parameters/filter_glob # modprobe -r xe_live_test # modprobe xe_live_test # ls /sys/kernel/debug/kunit/ xe_bo xe_dma_buf xe_migrate xe_mocs For completeness and to cover other use cases, also change filter and filter_action to rw. Link: https://lore.kernel.org/intel-xe/dzacvbdditbneiu3e3fmstjmttcbne44yspumpkd6sjn56jqpk@vxu7sksbqrp6/ Reviewed-by: Rae Moar Signed-off-by: Lucas De Marchi --- Rae, I kept your r-b from v1 since the additions are just what we talked about. v2: also change filter_action and filter to rw, testing with the xe module to see if filter=module=none filter_action=skip produces the result expected by igt lib/kunit/executor.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/kunit/executor.c b/lib/kunit/executor.c index 1236b3cd2fbb..371ddcee7fb5 100644 --- a/lib/kunit/executor.c +++ b/lib/kunit/executor.c @@ -31,13 +31,13 @@ static char *filter_glob_param; static char *filter_param; static char *filter_action_param; -module_param_named(filter_glob, filter_glob_param, charp, 0400); +module_param_named(filter_glob, filter_glob_param, charp, 0600); MODULE_PARM_DESC(filter_glob, "Filter which KUnit test suites/tests run at boot-time, e.g. list* or list*.*del_test"); -module_param_named(filter, filter_param, charp, 0400); +module_param_named(filter, filter_param, charp, 0600); MODULE_PARM_DESC(filter, "Filter which KUnit test suites/tests run at boot-time using attributes, e.g. speed>slow"); -module_param_named(filter_action, filter_action_param, charp, 0400); +module_param_named(filter_action, filter_action_param, charp, 0600); MODULE_PARM_DESC(filter_action, "Changes behavior of filtered tests using attributes, valid values are:\n" ": do not run filtered tests as normal\n" -- 2.40.1