From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.41 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796119477; b=BYG1XlP/wDDYhx8Us94y5V36qe/CZDz+WoHmXoqulqEZQa97coxhrcMRkKWoHSCVPkG/ khIkc4hy0QLA5egrnAQMsNawq73I93OQ4rZP1KmAYLWr8nYM810vvzG0C0dDt1x09n10q 7msxWWcgsJQ83Ma4i3AREDoRb2muKA5S8AcffMqmyHRpak14ARNL6/c0S70y6E8qQmlYy +fvVWIYWMv/90+Amz/KDrsuvNT7RSF79PSmHzfSG4kOXZ80sgh4Kt1jYpGF/jPFXn1thk J7I/s8d1Vj9HbX2fDtWeBjfZFY5SqtND1d9xMG/y4lCQnpyeM1wyJ7Z7oER7iJNfONg== 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=O5HZZ3/cBE7X1tCYV4LLlFY9hVu0Aa/q7oDj6IUKEvEgXuNE93XBSiYUxCc4PmlOGOgF De/YfV2msDxTfmXw9KYXpEGeVT8agXBJUErRsP8ywWumntfhIX0rG6ik6KBaYga+lSlPC antAjyykv+WTN8Fv+m5f6D/+I325RG6u0+Tmu6usrvnlWaXGkEzBybKd2d9boGw+EqFBP OC3eiMiSgUTLZHBfhon/OKFr6NzWhhT0XrfrzNxCn3CVAbwN7lRyw3kPNXdKftBEb0Php 874pQ7/LRAzcGy6WuZt8inY8QFoPUM3hmTpDxKXOpCWo4zOccWRuni5F8JbCB8S1hVg== 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.41 Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) (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 B2E06606A320 for ; Tue, 1 Dec 2026 10:04:36 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org B2E06606A320 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-f41.google.com with SMTP id 4fb4d7f45d1cf-6b8a52db5f9so13883545a12.3 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=ZCiYQ2Upr2HTkhLuGow+9AgXzFwPSAZgeQjRbkZlItKNDyKYpqCJvsJqkD6TrpMCyG j7fCA++u+ncw9ZwtOuKr75mxVxnXsLDtP0N+9MxoxwhIbKc7pWfA+DBr6iIw6Ol17WH8 cnc1kr+2yv+obF5qQqZIYnjA4GZDXe0wuojlunaN4ejRFXqCQ1TqF5LnyyMNQ4lEyinO 7aLdYHlKsM66dVq3RjKx7PwEIPpRtlSzvDAK4xY5s1+rTpZ7X+o4crS5uWV3fLzdCV5Q G7pM2xTv/x1c5WVZfq3ETjFTnFGB9RfDTcKq1ud7L6ErBiFcxvVKquVl0060Oq++ATGs aFsw== X-Forwarded-Encrypted: i=1; AL+hErEY0NZa8FRKbBkQ1okBhATogrsiVl6TmWqApzFN5p9hWwKCwZefJTFrnUivZMz9aBrPhx2zEfTLP5EOGV8z@vger.kernel.org X-Gm-Message-State: APuU4Z/ioItjHnNlkO8K7jbHh5crT8FoyPauog0iihyU47nqZtKVsbP2 uI+WrH6aoMSdSFjt833r6Lus99Jh0wHg8a8ZY5sDL8A8TGm5i1/gCcAW2/tJW/3mCa4= X-Gm-Gg: AZFdTZfCxi5bmN7ZYfPoGcFM/PisfrThp8a0LsYfnClo4UwWSmwmVvnfWxAU92P7pNJ 5Vp+1Bp03RiXGGke7t+f/8doyb/dLao7NX0YuhNIr0preGEyQwhwbxL9kg1ryah34uah4pg/776 +MzKCIVtYB8BtAC7lgr0b1YEEnBuA1HY5p00WHk+KG7zSBfTsykuFawKJOXp4qGpj/UQBo4mUgn Ck67f/vFXep86/8toExuHa9n24xQOhLQVt8ntLFbiYcCPc9iwtkm6Rz/Hf/zWdSx6/CvMnB4KOt Ir3UBzwzng9eONGl/4kz0V3Vp+2sS+Vz03GKEPm9iIPAXQQ7gpWIw47D94GF+11ZGpUtDBpxpD9 uB/2D25pgnSGAg/d/1JnajX0ptaIpPsxGUZQqJVeMIhTPvfdSQXrXFZbohs8LYbvVnxCmj6Aape PA/cdaNEWtCYklhinHAleguzoS4Q9bEmFf8J2nVsjNlZpMF7/Zt0TwCbN+wZ+jlCDclQMfU0D7P aiOmNWqGgb0B90buSJTwPT17BuG7eTV+gRxDqRZqmFjZuxCmO8qJ4jaMH8zwVpl/VN5KsNRZqvW 8jm5SSr492O4l8IPic1OjmWG8ZToVntcTfvBetB9prReXRSHY8w= 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: live-patching@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