From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796119477; b=xW/G59VQzjuiLBHfynzGcursdXfNDhV6aeGNX9utym++IrVBNAsfqXd/GHMwbx5zUI1g fLyopB6FS0Im0cEuJCRAFmhKgEEDWF9GpKnuGEWru6FMMf2Pg0caD8GDZoJ3kEwNxmCip hnNCtcHcipl3p0q/aagIG3kSELEN7/sZ/mE2IUmcS1olblHWJuRHp3vnWaLPLkFOJ/H2T c8Jhx76sMwf3AHyAtawc3kncJBMNrDcm7d3iiJM8Unb+9F37YH9UKexjagm43cF88Dsxp LFmjl1abxvzdSbfPW8UXNIICLGWiMnup+qFOT8hOIV1HC1y5UTUaDKf+RMLFzwIh4Hw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796119477; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; bh=vgfouqa2e91qoS7Bptc/J2u9aQnS4FHE5CaCykqCY34=; b=tmSBTkNuYXPVJg3ZUPdNLB/WXgE3zjJzxXmoNMzDYJ5hv6BdsK/+MTcrpK0P4QdDl74c foZPWeFjRJReR0ItYDZJ896DzHK7MElyrdIZByfkQ2c8OjxquVBN7lCQ050yAtGkIv6Vy DXH73FXH4y3yHEH2TFz0UqrgjZpGhtihVKHdGIlShNjN3EWnadPhyUy7m8AR7qNlTS/G7 bWKVlW+Q7YCcfO7suO+A4zEr9FUfZFxNUXQomiAeewqzdEI2uzLAdEp3pYHAnVBhFVx5i WY3HyTDoDGImi8l90LTyG7lqno4jU2n7PneeJNHkMFD14d0OuK5wXLJX6LINOODOrYg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b="a4QO/zDv"; arc=none smtp.remote-ip=209.85.208.51 Received: from mail-ed1-f51.google.com (mail-ed1-f51.google.com [209.85.208.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AE77E606A31A for ; Tue, 1 Dec 2026 10:04:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org AE77E606A31A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.a=rsa-sha256 header.s=google header.b=a4QO/zDv Received: by mail-ed1-f51.google.com with SMTP id 4fb4d7f45d1cf-6baa6f27904so12530015a12.0 for ; Tue, 01 Dec 2026 02:04:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1796119475; x=1796724275; darn=vger.kernel.org; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to:content-type; bh=vgfouqa2e91qoS7Bptc/J2u9aQnS4FHE5CaCykqCY34=; b=a4QO/zDvCTEteNXvvnbdYUCdMQA25RXX42gAcZfASnRfk3+FHL7g+soQG78p2HAIPG hjrogcHg6eP7oFkGgh39TkMFAcKt4h02MpkmJsuntMyd3qi1scQ050r5kWA6zfshqcdz B+BxFZF5zw3wHeqMIISE1jZC2/eaiO0oIL9T/tcBwaEEPOtRLjoh8BkDXkgI63tZYag1 2rrDzFf8OtsMCD8KCPrfTIEpUG0/62EK6R+us7h7xweQI7aCTAbZwjMeFkbX8ZfpkkqY aSTG1cyowoJPemN9DYkPLGQC6LIeuruc2OhG4kXuQmESuSh3ajwKJwLLiRXKJ4d6MFia qWXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796119475; x=1796724275; h=in-reply-to:content-disposition:content-type:mime-version :references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=vgfouqa2e91qoS7Bptc/J2u9aQnS4FHE5CaCykqCY34=; b=NrpnaZvL6rZmwjf73ocn05yzkpve5fVrLyEWsU3Ylv15YI5H5jlZrlZ9tEPcYx6Gv5 bytfzSwk+wJOswOY6wIl+d8vZ7Bju1JgnouY7WnSceUaqtofDZWqL2jGdIMXquVSVWr3 drvQsLl5gAaN/3XO8ViuojAf0ZtON1FqcpmjrQ91vXOULEGWCyBVPfQjJLeABD4lO5iL /Til7TA0VCNIfxPuA4qcsWts8pb6NzhT5t6WX+cWO4TjQIZUUN8LHERDWtavtjn+pwkg NzTjT/m5/4D2wJJeNoh1TZWvZFN0XofGAWF08nNUgij8oBw60N5myKm+V7LlXA9HnRT7 ZxuQ== X-Forwarded-Encrypted: i=1; AL+hErFaTlaLaeOQEnTX8pAUL+G8ovoah1EE/exKKCwbipLPznRce77EC9WDrueCtAsRtD1aoeK0mobGsXFrwI0=@vger.kernel.org X-Gm-Message-State: APuU4Z8A/5f6RHEaBrTZ8X7Pgn8ui6TpGJJg4KGvT0B57g8xHgIBM8pB xNyHIQIET5UpZZRyVrFK+NjVBaBqzZDJ828gIwZCCDDdvTo78YE0PX/rFAH90NQqn+Y= X-Gm-Gg: AZFdTZfhcN4pDWm7EFFKjnGGHJa0gFbCy/LCFtK5XByMYBbxGOJ/J3bc/Bh1jJFswi2 pacA4aESBn6BqUM5vkSspY8hwq0GkzB2+ALxVLRPGsAj/4TTynhrJyiIJsKdWWK5RNHBXG7NqTx czg36tW6bB6m/+YCihXzpYSxngK/K7kMtHFWqTGJmf+6M7bmPpto4BvzWmPqnmZrqr2Q1Ji6ulB Wg9z0Z3UTRQ7CV+RBz0Hll5xOPtPMQe3Dmo+fQZHgMskNhQpQgOTkSLWE7DpXN1tax+N5B4OqWf GfxMV5E2nsaEGeqxBwYNZKsDrlW309vgK/GogI61jti4DbiWli+6dXuBZiiu+lNKvZXCOOhExog CllP9IWHDlqAB3ZZ4b0ZAAwK8cofppXJ4/TyofA0CJ1yL8LrdApztuKgtxxCL0zKhWNoZ4Kayci c+21XtI3fvw7+tivMVXeU/zFeMcdPQjbh6H9hIbh5yZ13ujfOyKUsJ32VvtvTC24pdw86uyXuAX c9sri2gaOqlN+vuTsM3KJS8bTs94SlNcmc2BANbtB4FUfuNcMlFt2JRLuIH1U81nRLzNlAL8fzJ QER/CZSnJfXun9sbK7zD0EwZufdZZdoeATFYtISRyyTCWy3ojeg= X-Received: by 2002:a05:6402:8:b0:6b8:7769:ffec with SMTP id 4fb4d7f45d1cf-6ba37e9c293mr20458711a12.29.1796119475062; Tue, 01 Dec 2026 02:04:35 -0800 (PST) Received: from pathway.suse.cz ([176.114.240.130]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab9cf005f2sm58533559f8f.45.2026.12.01.02.04.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Dec 2026 02:04:34 -0800 (PST) Date: Tue, 1 Dec 2026 11:04:31 +0100 From: Petr Mladek To: Sasha Levin Cc: Josh Poimboeuf , Miroslav Benes , Joe Lawrence , Song Liu , Marcos Paulo de Souza , Eva Kurchatova , Yafang Shao , Shuah Khan , live-patching@vger.kernel.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v4 0/4] selftests/livepatch: build and run the tests outside the running kernel Message-ID: References: <20261110161050.2451750-1-sashal@kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261110161050.2451750-1-sashal@kernel.org> On Tue 2026-11-10 11:10:46, Sasha Levin wrote: > The livepatch selftests build their test modules against the running > kernel and skip every test without its devel files, so they do not > work when built for one kernel and run on another, as CI systems do. > In KernelCI, 36 of 69 kselftest builds of mainline fail to compile the > modules because the kernel lacks CONFIG_LIVEPATCH, and where the > modules do build, the installed tests skip themselves. > > - Patch 1 skips the modules and tests when livepatch is not enabled. > - Patch 2 lets "make clean" remove the modules without a kernel build > directory. > - Patch 3 builds the modules against the kernel in O= or KBUILD_OUTPUT. > - Patch 4 runs the tests with the installed modules, without the devel > files. > > Tested on x86_64 against kernels built with O= and in place, a kernel > without livepatch and the Debian headers. The modules build and clean > in every case, and the installed tests pass 8/8 in a VM without devel > files, where they were all skipped before. > > Changes since v3: > - Split into four patches, rewrote the commit messages and added > comments. (Petr) > - Moved the CONFIG_LIVEPATCH check into test_modules/Makefile, which > drops the extra clean target (Petr), and read it from > include/config/auto.conf. > - Patch 4 still skips when neither the modules nor KDIR are available. > (Petr) > > v3: https://lore.kernel.org/all/20261103222706.1642224-1-sashal@kernel.org/ > > Sasha Levin (4): > selftests/livepatch: skip the tests on kernels without livepatch > selftests/livepatch: clean the test modules without a kernel build > directory > selftests/livepatch: build the test modules against the kernel in O= > selftests/livepatch: run the tests with prebuilt test modules > > tools/testing/selftests/livepatch/Makefile | 26 +++++++++++++++++ > .../testing/selftests/livepatch/functions.sh | 13 ++++++--- > .../selftests/livepatch/test_modules/Makefile | 29 ++++++++++++++----- > 3 files changed, 57 insertions(+), 11 deletions(-) JFYI, the patchset has been committed into livepatching.git, branch for-7.5/selftests-build. Note: I had some doubts whether I should push this when I was the only reviewer. I did it because these changes in Makefiles are hard for review so I doubt that anyone else would volunteer for doing another review. We could get more feedback only when it breaks anyone's workflow. So, I think that it is better to get this into linux-next rather sooner than later. Feel free to ask me to remove it from linux-next if you do not like the changes. Best Regards, Petr