[LTP] [PATCH v3 3/3] max_map_count: replace ifdefs by tst_arch

Li Wang liwang@redhat.com
Tue Nov 9 10:35:04 CET 2021


> > +     switch (tst_arch.type) {
> > +     case TST_X86:
> > +     case TST_X86_64:
> > +             /* On x86, there's an old compat vsyscall page */
> > +             if (!strcmp(buf, "[vsyscall]"))
> > +                     return true;
> > +     break;
> > +     case TST_IA64:
> > +             /* On ia64, the vdso is not a proper mapping */
> > +             if (!strcmp(buf, "[vdso]"))
> > +                     return true;
> > +     break;
> > +     case TST_ARM:
> > +             /* Skip it when run it in aarch64 */
> > +             if ((!strcmp(un.machine, "aarch64"))
> > +                             || (!strcmp(un.machine, "aarch64_be")))
> > +                     return false;
>
>                 I wonder if this would be better as:
>
>                 if (tst_kernel_bits() == 64)
>                         return false;
>

Actually, we have TST_AARCH64 already, I'd go with switch to that.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20211109/85582b6f/attachment.htm>


More information about the ltp mailing list