public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Edward Liaw <edliaw@google.com>
Cc: kernel-team@android.com, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH] tst_kvercmp: Handle larger kernel version numbers
Date: Wed, 25 Oct 2023 01:14:29 +0200	[thread overview]
Message-ID: <20231024231429.GA282313@pevik> (raw)
In-Reply-To: <20231018015016.1897021-1-edliaw@google.com>

Hi Edward,

> Current implementation can only handle revision numbers up to 256.  Bump
> this up to 1024 as some revision numbers are in the 300s.

> Signed-off-by: Edward Liaw <edliaw@google.com>
> ---
>  lib/tst_kvercmp.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

> diff --git a/lib/tst_kvercmp.c b/lib/tst_kvercmp.c
> index 552920fac..9e1a511af 100644
> --- a/lib/tst_kvercmp.c
> +++ b/lib/tst_kvercmp.c
> @@ -92,8 +92,8 @@ int tst_kvcmp(const char *cur_kver, int r1, int r2, int r3)
>  		         cur_kver);
>  	}

> -	testver = (r1 << 16) + (r2 << 8) + r3;
> -	currver = (a1 << 16) + (a2 << 8) + a3;
> +	testver = (r1 << 20) + (r2 << 10) + r3;
> +	currver = (a1 << 20) + (a2 << 10) + a3;

I wonder why you need this change. Number > 256 is actually only the third
number, but we haven't checked that so far. Do you plan to use it actually?

We try to detect functional changes to avoid problems to compare about mainline
and *also* with stable/LTS kernels.

NOTE: checking for 3rd number actually does not work for Debian, which reports
`uname -r` as: 5.10.0-8-amd64 (the real version is only as an comment in
/boot/config-*). If something specific in stable would be needed, it would have
to use tst_kvercmp2() (e.g. utimensat01.c for Ubuntu). Maybe you have a similar
problem in AOSP kernel.

Kind regards,
Petr

>  	return currver - testver;
>  }

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

  parent reply	other threads:[~2023-10-24 23:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-18  1:50 [LTP] [PATCH] tst_kvercmp: Handle larger kernel version numbers Edward Liaw via ltp
2023-10-24 19:51 ` Petr Vorel
2023-10-24 23:14 ` Petr Vorel [this message]
2023-10-25  0:46   ` Edward Liaw via ltp
2023-10-25  5:35     ` Edward Liaw via ltp
2023-10-25  7:44       ` Petr Vorel
2023-10-25 14:04         ` Petr Vorel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231024231429.GA282313@pevik \
    --to=pvorel@suse.cz \
    --cc=edliaw@google.com \
    --cc=kernel-team@android.com \
    --cc=ltp@lists.linux.it \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox