Re: [PATCH v5 7/7] lib: Add 2 basic tests for .min_kver && .max_kver

Petr Vorel <[email protected]>
Newsgroups gmane.linux.ltp
Message-ID <20260811084943.GA1676037@pevik>
Hi Andrea,

> Hi Petr,

...
> > +static struct tst_test test = {
> > +	.min_kver = "4.4",
> > +	.max_kver = "7.2",
> > +	.test_all = do_test,
> > +};

> this test is a bit weird, it's system dependent and it will TPASS or
> TCONF according to the kernel version. Is there a way to test this
> in a different way? I know it's hacky, but maybe we can use
> __attribute__((constructor)) and fetch uname() info before running
> the maximum kernel version check.

Although this is an interesting idea, I'm not sure if I find time for it. Feel
free to further improve it. For me is in the end trying to fix fanotify20 :).

The point of the test is to at least run something (kind of minimal testing but
better than nothing, because it's naive to expect anybody who touches library
tests it carefully with the real tests).

Anyway, in CI it will be always the same due using container (TPASS on Ubuntu's
6.17.0-1020-azure).

Kind regards,
Petr

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.