[LTP] [PATCH] lib/tst_kvercmp.c: Update tst_parse_kver() condition
Egor Petrov
egor.petrov@oracle.com
Thu Oct 28 10:56:20 CEST 2021
tst_parse_kver() fails with kernel names like current
mainline kernel "5.15-rc7". Updated condition to fit
this template.
Signed-off-by: Egor Petrov <egor.petrov@oracle.com>
---
lib/tst_kvercmp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
index 8bf65d309..dc0daa746 100644
--- a/lib/tst_kvercmp.c
+++ b/lib/tst_kvercmp.c
@@ -65,7 +65,7 @@ int tst_parse_kver(const char *str_kver, int *v1, int *v2, int *v3)
/*
* Check for a short version e.g '2.4'
*/
- if (*str == ' ' || *str == '\0')
+ if (*str == ' ' || *str == '\0' || *str == '-')
return 0;
if (*(str++) != '.')
--
2.32.0.windows.2
More information about the ltp
mailing list