All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rteval: fix regex in kcompile to calculate patch number for kernel prefix
@ 2022-08-04 19:28 Manasi Godse
  2022-08-04 20:36 ` John Kacur
  0 siblings, 1 reply; 2+ messages in thread
From: Manasi Godse @ 2022-08-04 19:28 UTC (permalink / raw)
  To: jkacur; +Cc: linux-rt-users, lleshchi, kcarcia, magodse, gmanasi13

Updated the regular expression to find the kernel prefix of the source
file. If there are kernel source files with the same major.minor version
but different patch numbers, kcompile would pick up the first one that
is listed based on the kernel prefix and ignore the patch number.
Example: linux-5.17.11.tar.xz and linux-5.17.13.tar.xz. If 5.17.13 had
to be tested, kcompile could pick up linux-5.17.11.tar.xz

Signed-off-by: Manasi Godse <magodse@redhat.com>
---
 rteval/modules/loads/kcompile.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
index 4a8659c042e6..6dd8d940f8b3 100644
--- a/rteval/modules/loads/kcompile.py
+++ b/rteval/modules/loads/kcompile.py
@@ -176,7 +176,7 @@ class Kcompile(CommandLineLoad):
             if not os.path.exists(tarfile):
                 raise rtevalRuntimeError(self, f" tarfile {tarfile} does not exist!")
             self.source = tarfile
-            kernel_prefix = re.search(r"linux-\d{1,2}\.\d{1,3}", self.source).group(0)
+            kernel_prefix = re.search(r"linux-\d{1,2}\.\d{1,3}\.*\d{1,2}", self.source).group(0)
         else:
             tarfiles = glob.glob(os.path.join(self.srcdir, f"{DEFAULT_KERNEL_PREFIX}*"))
             if tarfiles:
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] rteval: fix regex in kcompile to calculate patch number for kernel prefix
  2022-08-04 19:28 [PATCH] rteval: fix regex in kcompile to calculate patch number for kernel prefix Manasi Godse
@ 2022-08-04 20:36 ` John Kacur
  0 siblings, 0 replies; 2+ messages in thread
From: John Kacur @ 2022-08-04 20:36 UTC (permalink / raw)
  To: Manasi Godse; +Cc: linux-rt-users, lleshchi, kcarcia, gmanasi13



On Thu, 4 Aug 2022, Manasi Godse wrote:

> Updated the regular expression to find the kernel prefix of the source
> file. If there are kernel source files with the same major.minor version
> but different patch numbers, kcompile would pick up the first one that
> is listed based on the kernel prefix and ignore the patch number.
> Example: linux-5.17.11.tar.xz and linux-5.17.13.tar.xz. If 5.17.13 had
> to be tested, kcompile could pick up linux-5.17.11.tar.xz
> 
> Signed-off-by: Manasi Godse <magodse@redhat.com>
> ---
>  rteval/modules/loads/kcompile.py | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/rteval/modules/loads/kcompile.py b/rteval/modules/loads/kcompile.py
> index 4a8659c042e6..6dd8d940f8b3 100644
> --- a/rteval/modules/loads/kcompile.py
> +++ b/rteval/modules/loads/kcompile.py
> @@ -176,7 +176,7 @@ class Kcompile(CommandLineLoad):
>              if not os.path.exists(tarfile):
>                  raise rtevalRuntimeError(self, f" tarfile {tarfile} does not exist!")
>              self.source = tarfile
> -            kernel_prefix = re.search(r"linux-\d{1,2}\.\d{1,3}", self.source).group(0)
> +            kernel_prefix = re.search(r"linux-\d{1,2}\.\d{1,3}\.*\d{1,2}", self.source).group(0)
>          else:
>              tarfiles = glob.glob(os.path.join(self.srcdir, f"{DEFAULT_KERNEL_PREFIX}*"))
>              if tarfiles:
> -- 
> 2.31.1
> 
> 
Signed-off-by: John Kacur <jkacur@redhat.com>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-04 20:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 19:28 [PATCH] rteval: fix regex in kcompile to calculate patch number for kernel prefix Manasi Godse
2022-08-04 20:36 ` John Kacur

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.