[LTP] [PATCH v3 5/7] Remove old kernel version check in C case when using tst_kvercmp

Petr Vorel pvorel@suse.cz
Fri Dec 16 11:03:32 CET 2022


Hi Xu,

> The oldest supported kernel version is 3.0, so remove them.
Reviewed-by: Petr Vorel <pvorel@suse.cz>

...
> +++ b/testcases/kernel/syscalls/sysctl/sysctl03.c
> @@ -68,14 +68,10 @@ static void verify_sysctl(void)

>  static void setup(void)
>  {
> -	if ((tst_kvercmp(2, 6, 32)) <= 0) {
> -		exp_eno = EPERM;
> -	} else {
> -		/* Look above this warning. */
> -		tst_res(TINFO,
> -			 "this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details");
> -		exp_eno = EACCES;
> -	}
> +	/* Look above this warning. */
> +	tst_res(TINFO,
> +		 "this test's results are based on potentially undocumented behavior in the kernel. read the NOTE in the source file for more details");

NOTE after you get this merged, I'm going to update sysctl03.c.
This warning is really old, it was added in b49b375167 ("Make test pass with
undoc'ed sysctl(2) behavior.") (in 2010) and references
https://bugzilla.kernel.org/show_bug.cgi?id=15446, which was fixed in 2012.

Thus warning is not needed any more. But as the test also requires converting to
docparse, I'll do it in separate patch.

Kind regards,
Petr

> +	exp_eno = EACCES;
>  }
...


More information about the ltp mailing list