From patchwork Sun Aug 18 19:42:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kacur X-Patchwork-Id: 820246 Received: from mail-yb1-f174.google.com (mail-yb1-f174.google.com [209.85.219.174]) (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 9CFEC14A61A for ; Sun, 18 Aug 2024 19:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724010155; cv=none; b=MmV29SGubOOaIFVAk4PLk6tQBi1LjKpy/m6vOqTY3RZG19WmFC+6GVcaRekELijqsKtUrqBSW32U2QAvjbnrdovXA9mim0/hGU5MIJ27jEbAEbBYNcGN1GEnkHdzUmNtCOxc4buGJ0xCXqnyNthhTCTOSLcqihYB15HQd7SbcF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724010155; c=relaxed/simple; bh=+ttm6tIO3g+/9PoaSHQDzq0EfYe9FL+8zgcHG5c931Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nUTfWOsmTrirzn2c/MmWhIcTCGD502P/KIhjqwpt9wdbkLBMd1QWvlburzlBSqZEOD7gatCjXnmaHr1jKbKFYADsW6iIdvCgVWicb5Ji76zQN/Nz7PIs7wcRKvkuS//6pgsQGZvYwG02c1EiPCO3An8+VDtjr6NEGmRa2a7jUvo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=KRhlGvky; arc=none smtp.client-ip=209.85.219.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="KRhlGvky" Received: by mail-yb1-f174.google.com with SMTP id 3f1490d57ef6-e0e6cbec8caso3603518276.1 for ; Sun, 18 Aug 2024 12:42:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724010151; x=1724614951; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=9wJKDnXFAkvyB+aFUXCK3mdSQRdx7/6Aa4O5IBcLKD0=; b=KRhlGvkyqREzHxbxc0BCM8xoaFCKdO3NVfSnrFMvFnvRwuUQ+GiBd24HvKumDlXkFN AybZsrH/IgeiOvnj8dLKIcGZMN105itsD90surLZEUxmV+KOyO3Bsirl984WNfKsWf0R mEZqe8mOb9bTFQXbLj+Vndd+KJGxN6n9D7VoJ80dRPXehckam+oKiyPTu5aITq7KLDGd iFJSS886nLJAkQNnWH7a+CJWf8qEDz+DNZEM92G5cGEgaDa0adcPvfjhc6LBkxHBZQ5m GaIKMIn1qlq/NSn2IeyEiXj5+s+w/mg/r00OK/us05+30G7DqJqP88b+vV6QQi2OQnMX +Vww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724010151; x=1724614951; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=9wJKDnXFAkvyB+aFUXCK3mdSQRdx7/6Aa4O5IBcLKD0=; b=lkYHgpg1sXMhJ2oiCly2as9t0UxNSwRlpq9vwIAmY3Z/luFVo9i2bHVnU1TcdkAFSm pnbGm5WSEN15rCk/1Kbs/TVT2xRu88veQijf04rHl8eb7Lu+yyA65cpWKsFwCGjwOjUz 7zfc3wYcrckJjMYX08xm/qsjs+22e1/hzbhScxh1kYDnWWeaF6yexaTHJkj5wM6pxuTv H4uxEVBCAat0yRWYpUNaMpoIomvAl3cGr+RZ/taQS1M6VcJnqtj+MWbo+yJmGBVcEsFW 1yqzKzptEeKy4fRTYqtBKMXz6vJHllpFUxpJiE5tcKn6VltZqn8GgY/4sl4sAV7GsRBi MRIw== X-Gm-Message-State: AOJu0YyHWn869HRqiEEGuzI4cNR4UAo3r4Y6fqixHmx0HgI7qis2a8+S bKxgsx1Y+u8PSYHUBw1U6gN+tXCsovAuTAuZ3otBDHteYiz+FAUTlMuchw== X-Google-Smtp-Source: AGHT+IHAx+df29v/4E7DKx3PykQOXGMiUvuFnIlxXqU+nCGPtQXp8KktXNzjECjeXu+ESGSvpOFAOw== X-Received: by 2002:a05:6902:2587:b0:e11:7d05:562b with SMTP id 3f1490d57ef6-e1180e6c6a3mr8157382276.3.1724010150879; Sun, 18 Aug 2024 12:42:30 -0700 (PDT) Received: from localhost.localdomain ([142.189.102.234]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bf6fec5f4fsm36909566d6.84.2024.08.18.12.42.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2024 12:42:30 -0700 (PDT) Sender: John Kacur From: John Kacur To: RT Cc: Clark Williams , Tomas Glozar , Crystal Wood , Chris White , Anubhav Shelat , John Kacur Subject: [PATCH 1/3] rteval: restore all load module options Date: Sun, 18 Aug 2024 15:42:14 -0400 Message-ID: <20240818194216.299176-2-jkacur@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240818194216.299176-1-jkacur@redhat.com> References: <20240818194216.299176-1-jkacur@redhat.com> Precedence: bulk X-Mailing-List: linux-rt-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Commit 56c7cf63942d rteval: Allow arguments specific to module group intended to allow group options to the overall measurement modules without applying to the load modules. It inadvertently disabled options for most load modules such as hackbench and kcompile. This patch reworks the overall group mechanism a little bit to restore these menus. Signed-off-by: John Kacur --- rteval/modules/__init__.py | 22 +++++++++++++++++----- rteval/modules/measurement/__init__.py | 12 +----------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/rteval/modules/__init__.py b/rteval/modules/__init__.py index acd6330788e2..eb29db86ce7a 100644 --- a/rteval/modules/__init__.py +++ b/rteval/modules/__init__.py @@ -280,10 +280,24 @@ reference from the first import""" grparser = parser.add_argument_group(f"Group Options for {self.__modtype} modules") grparser.add_argument(f'--{self.__modtype}-cpulist', - dest=f'{self.__modtype}___cpulist', action='store', default="", + dest=f'{self.__modtype}___cpulist', action='store', + default="", help=f'CPU list where {self.__modtype} modules will run', metavar='CPULIST') + # Set up options for measurement modules only + if self.__modtype == 'measurement': + grparser.add_argument(f'--{self.__modtype}-run-on-isolcpus', + dest = f'{self.__modtype}___run_on_isolcpus', + action = "store_true", + default = config.GetSection("measurement").setdefault("run-on-isolcpus", "false").lower() == "true", + help = "Include isolated CPUs in default cpulist") + grparser.add_argument('--idle-set', + dest='measurement___idlestate', + metavar='IDLESTATE', + default=None, + help='Idle state depth to set on cpus running measurement modules') + for (modname, mod) in list(self.__modsloaded.items()): opts = mod.ModuleParameters() if len(opts) == 0: @@ -296,7 +310,7 @@ reference from the first import""" # Ignore if a section is not found cfg = None - modgrparser = parser.add_argument_group(f"Options for the {shortmod} module") + grparser = parser.add_argument_group(f"Options for the {shortmod} module") for (o, s) in list(opts.items()): descr = 'descr' in s and s['descr'] or "" metavar = 'metavar' in s and s['metavar'] or None @@ -311,7 +325,7 @@ reference from the first import""" default = 'default' in s and s['default'] or None - modgrparser.add_argument(f'--{shortmod}-{o}', + grparser.add_argument(f'--{shortmod}-{o}', dest=f"{shortmod}___{o}", action='store', help='%s%s' % (descr, @@ -319,8 +333,6 @@ reference from the first import""" default=default, metavar=metavar) - return grparser - def InstantiateModule(self, modname, modcfg, modroot=None): """Imports a module and instantiates an object from the modules create() function. diff --git a/rteval/modules/measurement/__init__.py b/rteval/modules/measurement/__init__.py index 9314d1cb6bbc..44708ce0b035 100644 --- a/rteval/modules/measurement/__init__.py +++ b/rteval/modules/measurement/__init__.py @@ -29,17 +29,7 @@ class MeasurementModules(RtEvalModules): def SetupModuleOptions(self, parser): "Sets up all the measurement modules' parameters for the option parser" - grparser = super().SetupModuleOptions(parser) - - # Set up options specific for measurement module group - grparser.add_argument("--measurement-run-on-isolcpus", - dest="measurement___run_on_isolcpus", - action="store_true", - default=self._cfg.GetSection("measurement").setdefault("run-on-isolcpus", "false").lower() - == "true", - help="Include isolated CPUs in default cpulist") - grparser.add_argument('--idle-set', dest='measurement___idlestate', metavar='IDLESTATE', - default=None, help='Idle state depth to set on cpus running measurement modules') + super().SetupModuleOptions(parser) def Setup(self, modparams): From patchwork Sun Aug 18 19:42:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kacur X-Patchwork-Id: 821236 Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (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 19E391534EC for ; Sun, 18 Aug 2024 19:42:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724010155; cv=none; b=IRqzpO+CegKCluQ9qKXp8tS7ST6gzWusXF7Vju/9itmVXOE1hoyi+yYBwaioNzD5JDK5e57g8FzMT93JSMN3O4l5yBLoVE9efHGi/uFRjNequiHjPPFdBc+G1TCzcsolH2LRdZMKNAKBnV9IuRhQcnrXU+h7WuCzSvH6L3kVd+g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724010155; c=relaxed/simple; bh=/5HTi0IU2p9WPa9lf3YupEiwPpHU9Ey+LEef4+9TCyg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RMRbe9iXsgE0A8lHdX2mGqWtynvFlGZ+VyeDy/oOxYs+qkNx/EDO4swjhANUslo8zrxBVxEY8qRQ8/O5OtmGsbj1FRmLeBvD0lagJiVIuEWvV5klLnGKCV77D1t5HoEdO/MiQYVq1Ij6pcoY29buOvWIkixF2z2ZEoVaNfi0mRU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=HtEX7jbI; arc=none smtp.client-ip=209.85.219.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HtEX7jbI" Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-6bf9ddfc2dcso1238246d6.1 for ; Sun, 18 Aug 2024 12:42:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724010152; x=1724614952; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=j1TfhiQ3mpQYYWNHgYmvCxEnprmzEPO8HyCKXM3Kj2U=; b=HtEX7jbIh0S+nS8VwX0JE97PWsaHzAVqXImCTXeOWsJRCRv4A3aaJWZWcaJ82x4Pvh MLM9Hwlv2WIJ8CcNZ0RRF9I31DK7PDeSbWLR1CFHpLMpvv37Cb/B8A89+6Jx/MLCKOQi b+AWIr4NEOsfCqgQYrHdRDY9r4cQCBV4QrdpGG5krPcO3Pt2kZ9kSFxfP9VtPeXi7Bfb Tm5d4yj3CcaKHpuTKx4vHYe22H5JGOhe8X5sdciMS/LXHFmUSTZvKjgOh7z/WBjvlkPa 7N7LnKtx3r3WhLONt3tM8kXD97ZAEIYYQKdKatC9hPAvDtz1IZd8Ya4NebeBFRYkRRCM ggDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724010152; x=1724614952; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=j1TfhiQ3mpQYYWNHgYmvCxEnprmzEPO8HyCKXM3Kj2U=; b=BrlhlDW47f36VFV0uAPJleUelu+af10IYwiyuync3q6nYtsTRxVlrw6K4YWVysILyT NzoBDfcSR9GAGKr9oobS+2jM8yJfLgfZ+kqfRWqsUJGjjJq25paNHdodA+FVIGiXnQXX MNALc3pqVtUQUwlBhcRt3VMs8QgTJbMV7PowNwivyEXV85sb1L+gi7i0CwYjia3S2zkZ ba0gwLn7KFvwKOldm5ZIw7lan4CLKKjGUIonT218KKN1HxeuJLWeaxK8FiKkb9AiypAs tIa6DyNm5vrCoDHh307x6ZJxWEk+zGBUTBjcmRra9hj9NU4GpUo41U9gaOPLIG2Xr3N5 wswA== X-Gm-Message-State: AOJu0YyPdrEdH/MkYw0/hsS1va1crveJ3yqjDXe4FCcUO284sVXxy0vG VJgzONnvkzUN5vQyxaKj9k0SDMQPKN9gR7uUfNwsp9Du1XXJRggeGmpbnQ== X-Google-Smtp-Source: AGHT+IF4SkdxFi6xnltDQwz1pSKywF1Cvo0omGRiGIn5dCcC9V/zhaYtO8J3ZKaUt0yTdglsXxhayQ== X-Received: by 2002:a05:6214:3b89:b0:6b5:61:53a9 with SMTP id 6a1803df08f44-6bf7cdedd3bmr82573956d6.28.1724010152197; Sun, 18 Aug 2024 12:42:32 -0700 (PDT) Received: from localhost.localdomain ([142.189.102.234]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bf6fec5f4fsm36909566d6.84.2024.08.18.12.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2024 12:42:31 -0700 (PDT) Sender: John Kacur From: John Kacur To: RT Cc: Clark Williams , Tomas Glozar , Crystal Wood , Chris White , Anubhav Shelat , John Kacur Subject: [PATCH 2/3] rteval: Upgrade load kernel to linux-6.10.5 Date: Sun, 18 Aug 2024 15:42:15 -0400 Message-ID: <20240818194216.299176-3-jkacur@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240818194216.299176-1-jkacur@redhat.com> References: <20240818194216.299176-1-jkacur@redhat.com> Precedence: bulk X-Mailing-List: linux-rt-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 The older kernel fails to compile on newer tool chains, so upgrade the kernel that kcompile compiles as a load to linux-6.10.5 Signed-off-by: John Kacur --- Dockerfile | 2 +- Makefile | 2 +- rteval/modules/loads/kcompile.py | 4 ++-- rteval/rteval.conf | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index 45f6434777d4..f3ee516b57d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,7 @@ # Use CentOS Stream 9 as base image FROM centos:stream9 -ARG KERNEL_VERSION=linux-6.6.1.tar.xz +ARG KERNEL_VERSION=linux-6.10.5.tar.xz # Copy current directory to /opt/rteval/ diff --git a/Makefile b/Makefile index d9a6b9f116ac..e1a2bbba0373 100644 --- a/Makefile +++ b/Makefile @@ -14,7 +14,7 @@ PREFIX := /usr DATADIR := $(DESTDIR)/$(PREFIX)/share LOADDIR := loadsource -KLOAD := $(LOADDIR)/linux-6.6.1.tar.xz +KLOAD := $(LOADDIR)/linux-6.10.5.tar.xz BLOAD := $(LOADDIR)/dbench-4.0.tar.gz LOADS := $(KLOAD) $(BLOAD) diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py index f7a9c0084805..80106812af0a 100644 --- a/rteval/modules/loads/kcompile.py +++ b/rteval/modules/loads/kcompile.py @@ -21,7 +21,7 @@ expand_cpulist = cpulist_utils.expand_cpulist compress_cpulist = cpulist_utils.compress_cpulist nonisolated_cpulist = cpulist_utils.nonisolated_cpulist -DEFAULT_KERNEL_PREFIX = "linux-6.6" +DEFAULT_KERNEL_PREFIX = "linux-6.10.5" class KBuildJob: '''Class to manage a build job bound to a particular node''' @@ -334,7 +334,7 @@ class Kcompile(CommandLineLoad): def ModuleParameters(): return {"source": {"descr": "Source tar ball", - "default": "linux-6.6.1.tar.xz", + "default": "linux-6.10.5.tar.xz", "metavar": "TARBALL"}, "jobspercore": {"descr": "Number of working threads per core", "default": 2, diff --git a/rteval/rteval.conf b/rteval/rteval.conf index a4aad33e264f..0611c031c2a0 100644 --- a/rteval/rteval.conf +++ b/rteval/rteval.conf @@ -18,7 +18,7 @@ dbench: external stressng: module [kcompile] -source: linux-6.6.1.xz +source: linux-6.10.5.xz jobspercore: 2 [hackbench] From patchwork Sun Aug 18 19:42:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Kacur X-Patchwork-Id: 820245 Received: from mail-qv1-f45.google.com (mail-qv1-f45.google.com [209.85.219.45]) (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 BDE16136E0E for ; Sun, 18 Aug 2024 19:42:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.45 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724010156; cv=none; b=IXSPKsdEA9UkFUddUrQuJdiscyj1ep/l4pQdABX36dDom6FU6y0KwZml2czmpn6/rQtAbUV/Kptx8xkecG9TOwYEJ5SNTq8B+K+k/rtfsy+AI5pRx9nyJKcY3pLvgN/rlxrystxHIEvSnhax6377VFFpg4F2k7AxaPYcKnyLvXM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1724010156; c=relaxed/simple; bh=BqOyHHKiDqN0HU9OM9lYaQsiFeeZJOTuxAV54F8ixM0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=CNPYrwOUc6G9HTHWZADj8XdEkXkI4qkoa78IdNmS/ySQLgFkRun5HvVhjSXjFGrx/qoUba68ISMoww3PBkNxdikO4a501cZIYa8yisY/eySERIacpXtn73oTjljzaleqeQ2QM8S0ONyrN7lS1DczO7HXG2zwrpJewlLj4715joA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WCAzonmQ; arc=none smtp.client-ip=209.85.219.45 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WCAzonmQ" Received: by mail-qv1-f45.google.com with SMTP id 6a1803df08f44-6bf99fee82aso3311306d6.2 for ; Sun, 18 Aug 2024 12:42:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1724010153; x=1724614953; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=l+O+eAFl8v1echfvzcQU6H06Krm3NvFueaMXh+RD1Fg=; b=WCAzonmQjfcBsIjKjn1UQmKlvglFuZhJ4s89FPUYsfKvbNnmZwDfFuHCmDCW7nB5fp 0oceygRp3y21qIGNRh3hUpRdQj1kpi4hLVwcfSyoMENkcWgF8aWHfAb2uspICD2/+zZx 5kVMvla0ahvkx57VHd00mHGclsBWCyPs3Ytd05VKOUTMGk/mle1EGddn4YE/zAvfHYyx r9+Xlb9isS0CQ96/W7yfcLhcw/jJkY8ah1b/7c+XOB7AXklf04C9+V/zwz5VOsW+Mu2Z kCVmwXTOfDnXF9In/OuJLprf6WW5bwZw090dzs+ituOZKcGULtkjLt7F34DzLrnEjMdy 7kWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1724010153; x=1724614953; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:sender:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=l+O+eAFl8v1echfvzcQU6H06Krm3NvFueaMXh+RD1Fg=; b=QABRJboMuFeFLcX+h55A5anw3fRcEoJihtvjt5ykmcjSBLUYKKf+JYKQBC1GLFBZwr d7OrnN/6P0IaaknH21F0GqYU2SkJrH9dY0xBdnvZRcFasv3jtQ9ZNpM87YmP4FBTulM5 reF73eRRT427kX0awpA3hUHQrLnKnPi5H9qnBIcQH3fEMTYG7NoX0pCCbTb0By6y7ctR 6B4mzw1GkNNLxiRC2k9qpcQFyXHxtMT9SBZIs+mwB77ruzaaXnNgct+pl7dQl5vobSKM e2GIMY/GLDqKpSksOS3O8qwbCI/8yqq7beuxrprfwkK6W2X87Xac8YchdsW81/lqoFxq KFgg== X-Gm-Message-State: AOJu0YwSbbYLQ2E/fF8GKVwS7DJvoA+HPK3r5obUptLkc6XYqrmd+kV0 wQEw43LewHvDAKdy0LX42adLwZpBTENTvPtsJq8lCFWvzLyjKlTMnfRQRw== X-Google-Smtp-Source: AGHT+IHt1OeMQS3Zlb/2CkaYE4P5ewbfjmtGDdbLOZK49jzHyjY5lEeXxwwSr+umSrvVd3DL/8a9Qg== X-Received: by 2002:a05:6214:5342:b0:6bf:888d:a10a with SMTP id 6a1803df08f44-6bf888da38emr65882056d6.10.1724010153325; Sun, 18 Aug 2024 12:42:33 -0700 (PDT) Received: from localhost.localdomain ([142.189.102.234]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-6bf6fec5f4fsm36909566d6.84.2024.08.18.12.42.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Aug 2024 12:42:32 -0700 (PDT) Sender: John Kacur From: John Kacur To: RT Cc: Clark Williams , Tomas Glozar , Crystal Wood , Chris White , Anubhav Shelat , John Kacur Subject: [PATCH 3/3] rteval: Fix parsing in kcompile of the kernel to compile Date: Sun, 18 Aug 2024 15:42:16 -0400 Message-ID: <20240818194216.299176-4-jkacur@redhat.com> X-Mailer: git-send-email 2.46.0 In-Reply-To: <20240818194216.299176-1-jkacur@redhat.com> References: <20240818194216.299176-1-jkacur@redhat.com> Precedence: bulk X-Mailing-List: linux-rt-users@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 This patch does two things. 1. It allows you to create your own customer kernel with a dash -rteval in the name, eg, linux-6.10.5-rteval 2. It fixes parsing of the kernel name so that if the user requests linux-6.10.5 it doesn't use linux-6.10.6-rteval instead Signed-off-by: John Kacur --- rteval/modules/loads/kcompile.py | 30 +++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py index 80106812af0a..58c542201a1b 100644 --- a/rteval/modules/loads/kcompile.py +++ b/rteval/modules/loads/kcompile.py @@ -122,6 +122,8 @@ class Kcompile(CommandLineLoad): self.cpulist = config.cpulist CommandLineLoad.__init__(self, "kcompile", config, logger) self.logger = logger + self._kernel_prefix = "" + self._log(Log.DEBUG, f'self._cfg.source = {self._cfg.source}') def _extract_tarball(self): if self.source is None: @@ -152,22 +154,29 @@ class Kcompile(CommandLineLoad): f"error removing builddir ({self.builddir}) (ret={ret})") def _find_tarball(self): - # If the user specifies the full kernel name, check if available - tarfile = os.path.join(self.srcdir, self._cfg.source) - if os.path.exists(tarfile): - return tarfile + """ Find the tarball and self._kernel_prefix """ if 'rc' in self._cfg.source: - tarfile_prefix = re.search(r"\d{1,2}\.\d{1,3}\-[a-z]*\d{1,2}", self._cfg.source).group(0) + tarfile_prefix = re.search(r"\d{1,2}\.\d{1,3}\-rc\d{1,2}", self._cfg.source).group(0) + elif 'rteval' in self._cfg.source: + tarfile_prefix = re.search(r"(\d{1,2}\.\d{1,3}\.\d{1,3}\-rteval)|(\d{1,2}\.\d{1,3}\-rteval)", self._cfg.source).group(0) else: tarfile_prefix = re.search(r"(\d{1,2}\.\d{1,3}\.\d{1,3})|(\d{1,2}\.\d{1,3})", self._cfg.source).group(0) + # Save the kernel prefix + self._kernel_prefix = "linux-" + tarfile_prefix + + # If the user specifies the full kernel name, check if available + tarfile = os.path.join(self.srcdir, self._cfg.source) + if os.path.exists(tarfile): + return tarfile + # either a tar.xz or tar.gz might exist. Check for both. xz_file = os.path.join(self.srcdir,"linux-" + tarfile_prefix + ".tar.xz" ) gz_file = os.path.join(self.srcdir,"linux-" + tarfile_prefix + ".tar.gz" ) if os.path.exists(xz_file): return xz_file - elif os.path.exists(gz_file): + if os.path.exists(gz_file): return gz_file raise rtevalRuntimeError(self, f"tarfile {tarfile} does not exist!") @@ -178,21 +187,20 @@ class Kcompile(CommandLineLoad): # find our source tarball if self._cfg.source: self.source = self._find_tarball() - kernel_prefix = re.search(r"(linux-\d{1,2}\.\d{1,3}\.\d{1,3})|(linux-\d{1,2}\.\d{1,3})", self.source).group(0) else: tarfiles = glob.glob(os.path.join(self.srcdir, f"{DEFAULT_KERNEL_PREFIX}*")) if tarfiles: self.source = tarfiles[0] else: raise rtevalRuntimeError(self, f" no kernel tarballs found in {self.srcdir}") - kernel_prefix = DEFAULT_KERNEL_PREFIX - self._log(Log.DEBUG, f"kernel_prefix = {kernel_prefix}") + self._kernel_prefix = DEFAULT_KERNEL_PREFIX + self._log(Log.DEBUG, f"self._kernel_prefix = {self._kernel_prefix}") # check for existing directory kdir = None names = os.listdir(self.builddir) for d in names: - if d.startswith(kernel_prefix): + if d == self._kernel_prefix: kdir = d break if kdir is None: @@ -200,7 +208,7 @@ class Kcompile(CommandLineLoad): names = os.listdir(self.builddir) for d in names: self._log(Log.DEBUG, f"checking {d}") - if d.startswith(kernel_prefix): + if d == self._kernel_prefix: kdir = d break if kdir is None: