From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A70A8CA6007 for ; Thu, 8 Oct 2026 05:22:16 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id EA2F93E2C46 for ; Thu, 8 Oct 2026 07:22:14 +0200 (CEST) Received: from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it [IPv6:2001:4b78:1:20::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 0CCFE3E1456 for ; Thu, 8 Oct 2026 07:21:56 +0200 (CEST) Received: from mta1.migadu.com (out-211.mta1.migadu.com [IPv6:2001:41d0:203:375::d3]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-2.smtp.seeweb.it (Postfix) with ESMTPS id 86CED6009F3 for ; Thu, 8 Oct 2026 07:21:55 +0200 (CEST) X-Envelope-To: ltp@lists.linux.it DKIM-Signature: a=rsa-sha256; bh=dY0/jTaIcI0RjrReRWwzfFea0DIuOZAUj1nqLcCtJpc=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1791436914; v=1; x=1792041714; b=AOfAP6qX0MQSxVFaWeJoYAvHcFJWZlk2IGxgJafVLBkTrUHi1WYCOVE4C7N0hSaWvRXvdCXy W5SskUNM10TJZeq1dJuG3plszf/YqK/HGza3xwP1s/C71k65db/irGXTWuwKo8j5LvzORJ6/urK 7FJ/icY0dL4rjQZrn3OYgkVY= X-Envelope-To: ltp@lists.linux.it Received: by mta11.migadu.com with ESMTPS id bc85ff21fcc589f5; Thu, 08 Oct 2026 05:21:54 +0000 X-Mizu-Trace-ID: bc85ff21fcc589f5 X-Migadu-Flow: FLOW_OUT From: Li Wang To: ltp@lists.linux.it Date: Thu, 8 Oct 2026 13:21:37 +0800 Message-ID: <20261008052141.129763-1-li.wang@linux.dev> X-Mailer: git-send-email 2.56.0 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 1.0.9 at in-2.smtp.seeweb.it X-Virus-Status: Clean Subject: [LTP] [Patch v2 0/4] tst_kconfig: automatic module load/unload for CONFIG_*=m X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Tests that depend on a config set to =m currently load the module themselves, and may fail with misleading errors when it is missing, e.g. bind() returning EADDRNOTAVAIL for AF_VSOCK without vsock_loopback. This series makes tst_kconfig record the module for every config_module_maps[] entry seen as =m, load them once the kernel config check passes, and unload them at cleanup time. Changes in v2: - Add tst_module_is_loaded() helper. - Only load/unload modules that are not already loaded. - Skip automatic loading when KCONFIG_SKIP_CHECK=1, keeping the semantics consistent with skipping the config check. - Document the KCONFIG_SKIP_CHECK=1 behaviour for keyctl29/keyctl30 and the vsock/vsock_loopback mapping. Li Wang (4): lib: add module is loaded check tst_kconfig: load and unload kernel modules for CONFIG_*=m tst_kconfig: add module mappings for vsock/vsock_loopback testcases: drop manual tst_modprobe() now handled by tst_kconfig include/tst_kconfig.h | 28 +++++++ include/tst_module.h | 1 + lib/tst_kconfig.c | 81 +++++++++++++++++++++ lib/tst_module.c | 39 ++++++++++ lib/tst_test.c | 11 ++- testcases/cve/cve-2025-21756.c | 6 ++ testcases/cve/cve-2026-46331.c | 7 -- testcases/cve/sctphantom.c | 3 - testcases/kernel/syscalls/keyctl/keyctl29.c | 3 - testcases/kernel/syscalls/keyctl/keyctl30.c | 3 - 10 files changed, 164 insertions(+), 18 deletions(-) -- 2.56.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp