From: Li Wang <li.wang@linux.dev>
To: Petr Vorel <pvorel@suse.cz>,
Andrea Cervesato <andrea.cervesato@suse.com>,
ltp@lists.linux.it, Cyril Hrubis <chrubis@suse.cz>,
Jan Stancek <jstancek@redhat.com>
Subject: Re: [LTP] [RFC] Re: lib: Rename function check_kver() => check_min_kver()
Date: Tue, 4 Aug 2026 14:15:07 +0800 [thread overview]
Message-ID: <anGDa2dL19wKNtf6@linux.dev> (raw)
In-Reply-To: <anF5lV_yjqn8OuVE@linux.dev>
On Tue, Aug 04, 2026 at 01:33:09PM +0800, Li Wang wrote:
> Petr Vorel wrote:
>
> > Hi all,
> >
> > > > In that case we want to have both in a single commit, right?
> > > > => yet another version.
> >
> > > Yes, I think so
> >
> > I'm not sure what's reasonable, therefore RFC please.
> >
> > We can for sure can have test with both flags, .min_kver < .max_kver:
> >
> > .min_kver = "6.5"
> > .max_kver = "7.2"
> >
> > which will be tested on kernels <6.5, 7.2> (including all their stable
> > versions). Here the code works like (using AND):
> >
> > $(uname -r) >= .min_kver && $(uname -r) <= .max_kver
>
> This above is no porblem.
>
>
> > (BTW although current version prints only the version which is not sufficient.
> > And I think it's better than print the range without specifying which version is
> > not sufficient).
> >
> > But can we have also a variant when .min_kver > .max_kver (using OR)?
>
> No, please don't do this :).
>
> When I see:
>
> .min_kver = "7.2",
> .max_kver = "6.10",
>
> my first assumption would be that the metadata is wrong,
> not that it means:
>
> kver >= 7.2 || kver <= 6.10
>
> So this could easily hide real mistakes. If somebody accidentally
> swaps the two values, the framework would silently accept it and
> run the test on a different set of kernels instead of reporting
> an invalid range.
>
> I think .min_kver/.max_kver should keep simple AND semantics only,
> and .min_kver > .max_kver should be rejected, or at least reported
> as broken test metadata.
>
> If we really need to express "run on old kernels and new kernels,
> but skip a broken middle range", I think it would be better to handle
> that explicitly in the test code. That would be a bit more verbose,
> but much easier to read and review.
Or, we could achive something simply:
.supported_kvers = {
"<= 6.10",
">= 7.2",
},
But I don't think there is currently a strong demand for this.
--
Regards,
Li Wang
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-08-04 6:15 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-31 10:51 [LTP] [PATCH v3 0/5] Add support for .max_kver Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 1/5] lib: Rename function check_kver() => check_min_kver() Petr Vorel
2026-07-31 11:52 ` [LTP] " linuxtestproject.agent
2026-07-31 12:20 ` Petr Vorel
2026-07-31 12:37 ` Andrea Cervesato via ltp
2026-07-31 12:42 ` Petr Vorel
2026-07-31 12:44 ` Andrea Cervesato via ltp
2026-08-03 13:06 ` [LTP] [RFC] " Petr Vorel
2026-08-04 5:33 ` Li Wang
2026-08-04 6:15 ` Li Wang [this message]
2026-08-04 12:02 ` Petr Vorel
2026-08-03 13:13 ` [LTP] " Cyril Hrubis
2026-08-03 13:42 ` Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 2/5] lib: Add support for max_kver to struct tst_test and tst_fs Petr Vorel
2026-07-31 11:48 ` Avinesh Kumar via ltp
2026-07-31 10:51 ` [LTP] [PATCH v3 3/5] execve04: Use .max_kver Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 4/5] creat07: " Petr Vorel
2026-07-31 10:51 ` [LTP] [PATCH v3 5/5] fanotify20: Skip on v7.2 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=anGDa2dL19wKNtf6@linux.dev \
--to=li.wang@linux.dev \
--cc=andrea.cervesato@suse.com \
--cc=chrubis@suse.cz \
--cc=jstancek@redhat.com \
--cc=ltp@lists.linux.it \
--cc=pvorel@suse.cz \
/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 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.