Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp1988805rdd; Thu, 11 Jan 2024 16:13:28 -0800 (PST) X-Google-Smtp-Source: AGHT+IEGZs2wpxF2bu1DvAUOrKtma4dTOFv6rXH66pviD8SMVRkP7Xdg4733htnJ58pejtUaBTrB X-Received: by 2002:a81:4f8d:0:b0:5fa:b2bc:25c3 with SMTP id d135-20020a814f8d000000b005fab2bc25c3mr642364ywb.81.1705018407966; Thu, 11 Jan 2024 16:13:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705018407; cv=none; d=google.com; s=arc-20160816; b=dXVw4u4IezD+q/8jZbwTOGioOtkfl1pox2Vo8LaBJpnxCAlDcbY7R1uhOqhksHaPVq o46OuTcl+jwBps8u/74b+x4F8JNVIgwyyPjuu69zPRpJ1QHDefuRJsP5uUFVNIn0oSJd 08r2JnHF41+JxUH7VqvQAxQaYl5Y4S9TxARROfNPrMXnD+5CMI5pR/Syv7Vvcdu/nuaw nILfpxglRmcIAKkj5GuQA8ZocAItBJ5uMHk/XAVNY/QHuDTpRqjITveJ37vCVOhVbBPY DJitrhcsQOyYSI3sMpdFnJ+3yO3DvZPaRZP0dT/h7Vy/RTPheM5WzffS+2FLXjxfJWx/ roQQ== ARC-Message-Signature: i=1; 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=1y+a7Ey96VXZG8B/l1cwUkrlwzPCNBxt1/TAGxpOCeM=; fh=dje/RpDf2arD7EJ1G0YDPeYMwG3A5h7qtVPc/nCt1hA=; b=KhTuGIdR2a2ftwGTtV7fxRcTHP7U3+JmpN3yv1YVzJ+z1h5cB41f6PIvDK4oQnJdy4 FONU9yYrUj7WmFT58Ho9g116iahSvH6M4QYGbuvuH7rhANkquLcnXLi6l3kMM3bVtsXW B/t6enYls7tv3NMvFFficCfrFL3VC6HRP7OQFGT76IZpPXesUsUrPb9c7FkTtbLx0vJt miq8z9PK7l5T+sWXR+C5YabXx3zreYjKPN8iEhMQ2DL3ANK7LE8PQjIuAwBxn6wATUge n1QDfTzmD53HoC3vTUQFRboxC2aam3m9JbFnDh+7pJDiB7cYmJpORtxLs2MGe0QzCEc+ WD2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CPrprL4R; spf=pass (google.com: domain of linux-kernel+bounces-24174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24174-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id 19-20020ac84e93000000b00429c8f4d628si1330126qtp.164.2024.01.11.16.13.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 16:13:27 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=CPrprL4R; spf=pass (google.com: domain of linux-kernel+bounces-24174-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24174-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id B41311C20825 for ; Fri, 12 Jan 2024 00:13:27 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6FC15651; Fri, 12 Jan 2024 00:13:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="CPrprL4R" Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.120]) (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 20DF562A; Fri, 12 Jan 2024 00:13:17 +0000 (UTC) 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=1705018398; x=1736554398; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=AAr1jyF5ycUc3fnsLZxVVxgsc9+kH7u4LIsdUC1Iv88=; b=CPrprL4RslQDBzP9Wkh9a1me/QYZkRnhRHgHzsZqzOakB5P5qgSHSb8i EBX3Cm3pd4tO1ZLC5TNF27m2K+pEIwy821Wz1C9dzu6d3My8QN6CXdpW5 9nFZs65aXwt+EDbiRlUjXfZIultIqaueQwcCYF8Jq/lL/sxniI0C09dX6 5nGBDDRWl7lBaCeZiH9Scnit/Jzz9gr3EYdvbjpw3Lt1FpwOfzXjmGbda XgGqJO6xS6sgeIQ5VZrFfWQ1M4+VeegsyA2yJ8ULBXPcdrZOAJ1j2EyIx GGaD1x/hk+Nu1WcRD6U0gdT1rAKfh/Jur57RT9F77I/NCYVO1v1K+Z3Jg g==; X-IronPort-AV: E=McAfee;i="6600,9927,10950"; a="397915559" X-IronPort-AV: E=Sophos;i="6.04,187,1695711600"; d="scan'208";a="397915559" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 16:13:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10950"; a="853120102" X-IronPort-AV: E=Sophos;i="6.04,187,1695711600"; d="scan'208";a="853120102" Received: from lucas-s2600cw.jf.intel.com ([10.165.21.196]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Jan 2024 16:13:16 -0800 From: Lucas De Marchi To: linux-kernel@vger.kernel.org, kunit-dev@googlegroups.com, linux-kselftest@vger.kernel.org Cc: David Gow , Brendan Higgins , , Lucas De Marchi Subject: [PATCH] kunit: Mark filter_glob param as rw Date: Thu, 11 Jan 2024 16:12:40 -0800 Message-Id: <20240112001240.1710962-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 References: https://lore.kernel.org/intel-xe/dzacvbdditbneiu3e3fmstjmttcbne44yspumpkd6sjn56jqpk@vxu7sksbqrp6/ Signed-off-by: Lucas De Marchi --- lib/kunit/executor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/kunit/executor.c b/lib/kunit/executor.c index 1236b3cd2fbb..30ed9d321c19 100644 --- a/lib/kunit/executor.c +++ b/lib/kunit/executor.c @@ -31,7 +31,7 @@ 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); -- 2.40.1