rteval: fix regex in kcompile to calculate patch number for kernel prefix
PATCH 1/1 rteval: fix regex in kcompile to calculate patch number for kernel prefix
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
--- rteval/modules/loads/kcompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
rteval/modules/loads/kcompile.py +1 -1
@@ -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:
Signature · 1 line
2.31.1
Quoted 29 lines · Manasi Godse
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.xzSigned-off-by Manasi Godse <[email protected]>--- rteval/modules/loads/kcompile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)rteval/modules/loads/kcompile.py +1
-1@@ -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:Signature · 1 line
2.31.1