From: Petr Vorel <pvorel@suse.cz>
To: 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:02:43 +0200 [thread overview]
Message-ID: <20260804120243.GA285156@pevik> (raw)
In-Reply-To: <anGDa2dL19wKNtf6@linux.dev>
Hi Li, all,
> 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.
+1
> > > (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:
Agree, it'd be confusing.
> > 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.
Agree.
> > 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.
I can add this check in new version.
FYI other changes will be
Actually remove any version restriction for creat07.c and execve04.c (ETXTBSY is
required due revert as Cyril found and this revert was backported).
+ what we already discussed:
include/tst_test.h
- * on any stable release (test with ``min_kver = "7.1"`` runs also on kernel
+ * on any stable release (test with ``max_kver = "7.1"`` runs also on kernel
lib/tst_test.c
- for (i=0, dots=0; max_kver[i]; i++)
+ for (i = 0, dots = 0; max_kver[i]; i++)
> > 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.
Agree, but we also loose this info from the metadata.
> Or, we could achive something simply:
> .supported_kvers = {
> "<= 6.10",
> ">= 7.2",
> },
Using arrays is a good idea, thanks. We would still somehow decide which boolean
should be used (OR or AND), by some flag (e.g. having supported_kvers struct with
array of values and int flag).
> But I don't think there is currently a strong demand for this.
+1. I'd postpone this until it's actually needed (if ever).
Thanks for your feedback!
Kind regards,
Petr
--
Mailing list info: https://lists.linux.it/listinfo/ltp
next prev parent reply other threads:[~2026-08-04 12:03 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
2026-08-04 12:02 ` Petr Vorel [this message]
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=20260804120243.GA285156@pevik \
--to=pvorel@suse.cz \
--cc=andrea.cervesato@suse.com \
--cc=chrubis@suse.cz \
--cc=jstancek@redhat.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 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.