From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.49 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796119477; b=x6266SPdjwJ5n/W0PgEMlfdpUlDka3BcG4TCr+VGI6mRK+dwmrrV5SEsSpssTOJfK04+ PKySniigUUyHD9lJGRkU+khjq+Lt/CK7l+2tlRM+hnIZddeAHNzBG3vtdB64i7LwuUgxs JR0+9GVApn5oBV4kqKxrq3NXxg7PHIwtDHgFuT+ktQGc4yh6j4BowTtSod3L2iNpwLw8/ 4fXj0pCK9Ur7Ey/oS5JRM5xHAEQNDj6aUyCGaClk7sCTgoQmPpuR8CgiiARRVtTUEFWKB OaI1e/zjhbroBA479Bcu+kOo7LxH240p7GzeW4RSFuJK1ng8G9sr2OQYTk41s1fpbPQ== 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=aDPj2/4PpGl3MZNhAI5kD4WNbQiGqUpYXtlrLmAEIshgmBwKMViM6pMxknIWJN7xTkH9 XJpfO7O93WFO3vv6b4uClfIjdzs5U0/KnX1TrGL71yw68kq+aBwBv7KGhkq1jXKHXP68E pb93/qE6erNeGjgZn0GrkHjF1zkw49qWjXR8l5HvhSMCZJGbCvqGeXUdm/gZ483MRtCHj K6biqukIcsqmhZKKpsORCvzisJRtaw7+bF075Bhib83l7uJtdRMvfPIHDsQty30giSs3J YjbA2mKOjplVGMKYIjderjcLoNl4axP3PyIUbLjvBTIpGu7/TmgGcgBmU9ZFYx7Utug== 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.49 Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) (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 B3B78606A325 for ; Tue, 1 Dec 2026 10:04:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B3B78606A325 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-f49.google.com with SMTP id 4fb4d7f45d1cf-6b8c60e0d39so14696045a12.2 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=Fcw0/LIaLRv6qDQBnY9UwWDQVir7U4j4N2NTiitWBT2Zwn+QVCnQctdXkUdaMBa1zx g6LQd6F4O5SP7LijjcLIEwwN+FU/PGzJzcuJnOCwM2DcSIdkOo14vsx6/akCmpQEJZJd QCoinOJYO+vm4DVsSjvP102XOYg2lmy7f/NkffEGa7uFZF4TiDp/cLZASfa0b1tm76vH zZSBZZFuZD7TM1Kbsju++eyahCWILkN9q7qvR5Zd3ousmTPFd827qJasTT/X3Hcv05Sy 0Ja/CG7+cR56W6ZX6y1+zK7wYtY92loGlxxvaT01WJWwI652avasUw38tf8YJSg0Tuv4 X+qw== X-Forwarded-Encrypted: i=1; AL+hErG0cgmfVZJsd7OCxnILOieuXMgxtbjiGbh/LL0cVA1+ADVnxxzf+sH0ETjvw0Zgev+PcwIvoU2L2jIgCqNX6fI=@vger.kernel.org X-Gm-Message-State: APuU4Z9xLwvlGeqvOvhoIIh3IjndKr3SBSxcKxyGwOp2LfZv8Yw3viyt O4wJlzae3EuM4XmE7GFrBPtEMfUVerlu+abqjZrolnleU0qhkd+vwmwCa+Yw5kO1w5E= X-Gm-Gg: AZFdTZdZ17JQWe39TkRc7I44inTHcz4DqZ7xisGkuucm/wb2aX+inI15Dudy+mfkAnl i783hpu8ueEFwsU0CzboHRcLHoSKlckeZ+bkjmE4sg8ASJ6fa5h1fFzq/ggLlhqEGoSAuKPJYh2 C5up3ovTU2Fk+ptkfYGeSgbOJdiW5tnCagb6/9pMyLtTuKZLHDzkmECuYP7mBBxO6T+0XtBh3jR Bh8CTEUP3itEK6oq0rCvyY43SKmczIPzxIo46WV7L2EKl0WWdZHkXWTXAT1FWrGQHeHQr7qn+V1 eID0fxgXgD7/cMarYmC7z/LU/JZz4JFIK9WD0Shm2VFfZqKqFEVL8uGAFe6JHRP0zMBui/7MGIh g/R9iNy0i5VkoBkSKQZf4sZ5P+o0MqFcfyjAQQQcuQJBTFJmqu8EhAKBW+VAmuLgpgzw5oQB/8I 6ZBsTt1Rx94QjnNQ9H1DieHAtgX1VeF0hFqdvXRji+Vev0iHQAh7rWuyMwfR/dEUprU3nW2++lq YQZPjb4JrDAmv0wyPM+4mXmkbhmM6T7GSlzkUZbV2hWvbE3UmPsChOp4vBnTO9zkQ3lV8bCeWFB HOYUAVtNtqY9jnbfkXLY/kzv2dhwnrN/v1+fnn7ErUJCppo82Eg= 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-kselftest@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