[LTP] [PATCH 3/3] mbind01: add more tests for MPOL_LOCAL

Jan Stancek jstancek@redhat.com
Fri Jul 30 13:54:55 CEST 2021


>
> Or, If we want something more precise, just cancel the
> check_policy_pref_or_local on kernel >= 5.14.
>
> Is this sound better?
>
> -       if ((tst_kvercmp(3, 8, 0)) < 0 && (tc->policy == MPOL_LOCAL)) {
> -               tst_res(TCONF, "%s is not supported",
> tst_mempolicy_mode_name(tc->policy));
> -               return;
>
> +       if (tc->policy == MPOL_LOCAL) {
> +               if ((tst_kvercmp(3, 8, 0)) < 0) {
> +                       tst_res(TCONF, "%s is not supported",
> tst_mempolicy_mode_name(tc->policy));
> +                       return;
> +               }
> +
> +               if ((tst_kvercmp(5, 14, 0)) >= 0)
> +                       tc->check_policy = NULL;
>
>
Yes, that works too.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20210730/78002607/attachment.htm>


More information about the ltp mailing list