Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp70706rdb; Wed, 17 Jan 2024 17:53:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IE0TPsJAHkQVaLCy6N7j9pLThhl9VborLrq5wKuXv+b+Zof6MUvm59aNPTODsHZ1FB2PpKR X-Received: by 2002:a05:6808:221a:b0:3bd:9968:8986 with SMTP id bd26-20020a056808221a00b003bd99688986mr204920oib.85.1705542792202; Wed, 17 Jan 2024 17:53:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705542792; cv=pass; d=google.com; s=arc-20160816; b=FZpcxNSZu2xEh+ATAP2BvL2u4f1PxJ3tAJS9Vk6rQTRNnodj3smsFpb3Rkca2lVimT MhjKM1gE9pE0tFD9PYWj56XIaBr6Gfb6GJxjATY9uy/8ooaN5dIp/9JSUW3fh/mBnzrH wzm4UEMrsNbJNmGAZOfaU2mfCDZ/jhJx2LyWgn43yKRjJJ/so0papRRmknE3Dg5RFKMq FDqQnWWFrr94s5UxsbQlRkLCetQyte5YJXvaImy5jCDsXZVvhmungs2KWbnSls2YuFOF tkUrTTer9oe8gLwg/LTctzPAIV3+N5Ufepru6zgPgRFJQ3bBaY0+xuf0GC32pcZ+wGf6 ovSg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :user-agent:content-transfer-encoding:references:in-reply-to:date:cc :to:from:subject:message-id:dkim-signature; bh=taCIpUJqzL+JyTaiMa3v4bP+c2WFVuuQ9gZ9COs9zu8=; fh=3Zymvs7+MdUFWw0Bh2cs1N9dUMDeL0n/tFQggNEc+6c=; b=lhkwEAIdMr5oPnTp/lHcyt8CxZfDcimSkJUurGgn/9hDd2MPdTJQbSHMD3Q1Jm3EBm RkWTXGB5W40jbw5dpVMnNU/3v14LjkqqfT5oBCJoqXpPJ+gCDVWTQol2+gCGynxlQBjy uuP9MeClIR1/0BAuI7wYaMU8juUsVxCsMepwIHwPnOJl5QmvWeCSI1GW1ps65skU4YkZ IpUVFKTIXV3e8N5DSXBFEOaCU8FofhlxdTrOAM1j4IrQlg+vWBY2Cd2JcaCJCTIYTpUO YamPO8rj8VgWVFiiS4xmLEHlVs1TF9A+iqdvh2+EnZZrsJgcT5iXxu3ddeg8rzr0dh/p 1mbg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=W3m259+Y; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-29637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id y20-20020a637d14000000b005cdf7904221si597683pgc.207.2024.01.17.17.53.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 17:53:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.com header.s=google header.b=W3m259+Y; arc=pass (i=1 spf=pass spfdomain=suse.com dkim=pass dkdomain=suse.com dmarc=pass fromdomain=suse.com); spf=pass (google.com: domain of linux-kernel+bounces-29637-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29637-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=suse.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id CBF4E281654 for ; Thu, 18 Jan 2024 01:53:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 244D54436; Thu, 18 Jan 2024 01:53:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b="W3m259+Y" Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6E54423D8 for ; Thu, 18 Jan 2024 01:53:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705542782; cv=none; b=BkQIe/ssoJ/+t4B0OnfwHnPKHVBwlLIvK263axy11ZqSo33gGAoCPxPJEFM7Dy6s0DGpJI/Na5HA5c6R7qOV4EQ+ujpT7RDLVqyFTf5fyPIuI+IYVcz89qxV/P/O1VdY2QvcssV2o1qDcS85o1zb3nU1/+1v5Xdc8sQKXYZLxlM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705542782; c=relaxed/simple; bh=TbGKo9XwnaWFRnDaGJQYGEDB3n+mODCRkk1sjg7BuRA=; h=Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Google-Smtp-Source:X-Received:Received: Message-ID:Subject:From:To:Cc:Date:In-Reply-To:References: Content-Type:Content-Transfer-Encoding:User-Agent:MIME-Version; b=Ngj1jQBHKg7irl9pBRrAwmDT8sRAYeZLC1o71Hm9bgO0ufOr90oiQqA/8sIFcwfAZUjxluCAaSVaB4mBtewAGwPZfizMI+bPFlVL9T2e8uYlPolRznSmLCijOiIRkshsGegg/QfK+0a2pxBBBQz5cHbsiFXBZZ+X3HQQhZ10jQM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (2048-bit key) header.d=suse.com header.i=@suse.com header.b=W3m259+Y; arc=none smtp.client-ip=209.85.208.175 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 Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2ccbc328744so142377851fa.3 for ; Wed, 17 Jan 2024 17:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1705542778; x=1706147578; darn=vger.kernel.org; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:from:to:cc:subject :date:message-id:reply-to; bh=taCIpUJqzL+JyTaiMa3v4bP+c2WFVuuQ9gZ9COs9zu8=; b=W3m259+YmlnMuOAK6XKKmaoxzp5GGgx3fAtvpII5LF5lLztUFbWKPSw4hN78NgVby3 kT5w/VsyaCVOv4qT5OnPO8r0Gevcgxl91/k89Z9nY9E0r9Qfj/23hwnb+577gamTuwiY 4fpYgw+oVNniaB63cN/ZK8SclF6Ph3RZBkLdrn/AGFDwUj2cOuzkoxrNnpHBfhSUKrUc jgnK75bXS2guTzpXzDVKqgDemgPEnQ/jYPT6EuoF9/FdybTtSmzis6tdW7Joia7XjPJo F7e2HN73aiFt8eMRng1P5FYZfsj3wvMhWbiKfY4nqnbkw8bgI+reT1IVF9Nx4AjxkBN8 WWvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705542778; x=1706147578; h=mime-version:user-agent:content-transfer-encoding:references :in-reply-to:date:cc:to:from:subject:message-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=taCIpUJqzL+JyTaiMa3v4bP+c2WFVuuQ9gZ9COs9zu8=; b=gcdPbscD/lmgkZ50R4/IMseQob4SpRS0dEJXKWWlHKyvpB471gOgNqVA2+AZYwG/HZ fqFDtbjiBlDh7zKQp1HVQxbjLaqyRrjD4NQkX+UT82zhNeDCopx/F1syRtBkDRhPUujD fyEBbQfZ2n58PHB+D0nefURtIOH6VQw0dtS5K5tKNu+e4CqqBjnbnZSygjmUcbkNweor Ce2qHS3o96E5fiynOt1jdGRAqM+ZsUgKZd3UZYJTdEgu/IQ+nJdWaGt4iXAMwXY1hEub fG8pPIa3qZmGwFT4gaIBLSXjkwGbNQ9PgMdK7JoJrNn/rVc4OLtyq26mLxM3rHVd4nKt PHag== X-Gm-Message-State: AOJu0Yzazsi1+ab/VvaLUEXbbuVbY5awYg2dhT6/E1IGACdEGn6/ZnvW ipIfXtQGosBVVuaErMWJ9kfevlkevUjQLRyQnT//5EwfzVDtGykzftyE3TC5LLk= X-Received: by 2002:a2e:9050:0:b0:2cc:a7b9:2fa0 with SMTP id n16-20020a2e9050000000b002cca7b92fa0mr66494ljg.12.1705542778479; Wed, 17 Jan 2024 17:52:58 -0800 (PST) Received: from ?IPv6:2804:30c:974:ac00:1b02:e2fd:23be:79bc? ([2804:30c:974:ac00:1b02:e2fd:23be:79bc]) by smtp.gmail.com with ESMTPSA id y2-20020a63e242000000b005cd78f13608sm338946pgj.13.2024.01.17.17.52.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jan 2024 17:52:58 -0800 (PST) Message-ID: <4aaa05fb405e921f25c907ca09ea29976ca0707c.camel@suse.com> Subject: Re: [PATCH v6 2/3] livepatch: Move tests from lib/livepatch to selftests/livepatch From: mpdesouza@suse.com To: Alexander Gordeev Cc: Shuah Khan , Jonathan Corbet , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Sven Schnelle , Josh Poimboeuf , Jiri Kosina , Miroslav Benes , Petr Mladek , Joe Lawrence , linux-kselftest@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-s390@vger.kernel.org, live-patching@vger.kernel.org Date: Wed, 17 Jan 2024 22:52:51 -0300 In-Reply-To: References: <20240112-send-lp-kselftests-v6-0-79f3e9a46717@suse.com> <20240112-send-lp-kselftests-v6-2-79f3e9a46717@suse.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.50.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 On Wed, 2024-01-17 at 16:40 +0100, Alexander Gordeev wrote: > On Fri, Jan 12, 2024 at 02:43:51PM -0300, Marcos Paulo de Souza > wrote: >=20 > Hi Marcos! Hello! >=20 > > Having the modules being built as out-of-modules requires changing > > the > > currently used 'modprobe' by 'insmod' and adapt the test scripts > > that > > check for the kernel message buffer. >=20 > Please, correct me if I am wrong, but with this change one would > require a configured build environment and kernel tree that matches > running kernel in order to run tests. Is that correct? You don't need a kernel tree in order to run the tests, you can build the modules and use gen_tar to pack them, setting KDIR to the currently built kernel: make KDIR=3D$(pwd) TARGETS=3Dlivepatch -C tools/testing/selftests This can be used when packaging the tests, like Joe showed when reviewing the v4: mkdir /tmp/test-install make KDIR=3D$(pwd) INSTALL_PATH=3D/tmp/test-install TARGETS=3Dlivepatch -C tools/testing/selftests install In this case /tmp/test-install will contain the scripts and the modules compiled targeting the same kernel version from the kernel built from the kernel tree. You can also run the tests from the kernel tree but targeting your currently running system. Using this approach you can run the tests on machines without kernel tree and without build environment. You can also pick the kernel source and run make kselftest TARGETS=3Dlivepatch As KDIR wasn't set it builds the livepatch test modules targeting /lib/modules/=20 > Thanks!