All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: LTP List <ltp@lists.linux.it>
Subject: Re: [LTP] [PATCH v3 3/3] max_map_count: replace ifdefs by tst_arch
Date: Tue, 9 Nov 2021 11:47:55 +0100	[thread overview]
Message-ID: <YYpR201x6Ew7D9Zf@yuki> (raw)
In-Reply-To: <CAEemH2cw=cSgoX=5-A_Q0_N4rhSBUYmqvWdtPEZoEngc1wZxsA@mail.gmail.com>

Hi!
> > > +     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.

That wouldn't work right? Since we are checking here if 32bit ARM binary
runs on 64bit AARCH64 kernel. The tst_arch defines for which
architecture the binary was build while the tst_kernel_bits() checks if
the kernel is 32bit or 64bit.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2021-11-09 10:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-08  2:14 [LTP] [PATCH v3 1/3] lib: adding .supported_archs field in tst_test structure Li Wang
2021-11-08  2:14 ` [LTP] [PATCH v3 2/3] testcase: make use of .supported_archs Li Wang
2021-11-08 12:41   ` Cyril Hrubis
2021-11-09  6:52     ` Li Wang
2021-11-08  2:14 ` [LTP] [PATCH v3 3/3] max_map_count: replace ifdefs by tst_arch Li Wang
2021-11-08 12:44   ` Cyril Hrubis
2021-11-09  9:35     ` Li Wang
2021-11-09 10:47       ` Cyril Hrubis [this message]
2021-11-09 11:41         ` Li Wang
2021-11-08 12:34 ` [LTP] [PATCH v3 1/3] lib: adding .supported_archs field in tst_test structure Cyril Hrubis
2021-11-09  7:52   ` Li Wang

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=YYpR201x6Ew7D9Zf@yuki \
    --to=chrubis@suse.cz \
    --cc=liwang@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.