ltp.lists.linux.it archive mirror
 help / color / mirror / Atom feed
* [LTP] [PATCH] lib/tst_kvercmp.c: Update tst_parse_kver() condition
@ 2021-10-28  8:56 Egor Petrov
  2021-10-29  7:50 ` Petr Vorel
  2021-10-29 11:45 ` Cyril Hrubis
  0 siblings, 2 replies; 3+ messages in thread
From: Egor Petrov @ 2021-10-28  8:56 UTC (permalink / raw)
  To: ltp; +Cc: egor.petrov

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


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] lib/tst_kvercmp.c: Update tst_parse_kver() condition
  2021-10-28  8:56 [LTP] [PATCH] lib/tst_kvercmp.c: Update tst_parse_kver() condition Egor Petrov
@ 2021-10-29  7:50 ` Petr Vorel
  2021-10-29 11:45 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Petr Vorel @ 2021-10-29  7:50 UTC (permalink / raw)
  To: Egor Petrov; +Cc: ltp

Hi Egor,

> tst_parse_kver() fails with kernel names like current
> mainline kernel "5.15-rc7". Updated condition to fit
> this template.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

* Re: [LTP] [PATCH] lib/tst_kvercmp.c: Update tst_parse_kver() condition
  2021-10-28  8:56 [LTP] [PATCH] lib/tst_kvercmp.c: Update tst_parse_kver() condition Egor Petrov
  2021-10-29  7:50 ` Petr Vorel
@ 2021-10-29 11:45 ` Cyril Hrubis
  1 sibling, 0 replies; 3+ messages in thread
From: Cyril Hrubis @ 2021-10-29 11:45 UTC (permalink / raw)
  To: Egor Petrov; +Cc: ltp

Hi!
Pushed, thanks.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

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

end of thread, other threads:[~2021-10-29 11:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-28  8:56 [LTP] [PATCH] lib/tst_kvercmp.c: Update tst_parse_kver() condition Egor Petrov
2021-10-29  7:50 ` Petr Vorel
2021-10-29 11:45 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).