public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Wei Mi <wmi@google.com>
Cc: Mike Stump <mikestump@comcast.net>,
	GCC Patches <gcc-patches@gcc.gnu.org>,
	       David Li <davidxl@google.com>,
	Diego Novillo <dnovillo@google.com>,
	       Kostya Serebryany <kcc@google.com>,
	       Dodji Seketeli <dseketel@redhat.com>
Subject: Re: [PATCH] asan unit tests from llvm lit-test
Date: Mon, 03 Dec 2012 19:44:00 -0000	[thread overview]
Message-ID: <20121203194441.GE2315@tucnak.redhat.com> (raw)
In-Reply-To: <CA+4CFy6=OcwXjO=GcPmKuRpR7mE8APgPYJCE8+GzxA3Xz=Y7aA@mail.gmail.com>

On Mon, Dec 03, 2012 at 10:32:52AM -0800, Wei Mi wrote:
> Jakub, thank you for your so detailed comments! I will fix them
> according to your comments. About the lto options, llvm test does't
> include it too so I skipped it in torture options. Is it because most
> cases we only use asan under O1/O2? Kostya, could you tell us is there
> any reason to not test lto+asan in llvm side?

The former lit-tests are usually single source file anyway, so I think
lto doesn't change much (and by testing also with lto (or -g) we actually
test that those option combinations work with asan too).  For the gtest
based tests it matters more, but those are also much more test time
intensive (at least asan_test.C is), so that one is for -O2 only.

> >> --- gcc/testsuite/c-c++-common/asan/strip-path-prefix-1.c     (revision 0)
> >> +++ gcc/testsuite/c-c++-common/asan/strip-path-prefix-1.c     (revision 0)
> >> @@ -0,0 +1,14 @@
> >> +/* { dg-do run } */
> >> +/* { dg-skip-if "" { *-*-* }  { "*" } { "-O2 -m64" } } */
> >
> > The -m64 here is just wrong.  If you want to run the test only
> > for -O2 and x86_64-linux compilation (why?, what is so specific
> > about it to that combination?), then you'd do
> > /* { dg-do run { target { { i?86-*-* x86_64-*-* } && lp64 } } } */
> > /* { dg-skip-if "" { *-*-* }  { "*" } { "-O2" } } */
> > or so.  But again, why?
> >
> 
> I copied it from llvm test. I think it just think -m64 test is enough
> to check the feature.

Yeah, I could understand it wants to check somewhere, and with
FILECHECK/llvm that is the way to do that.  The above dg-skip-if
will mean though that if you test say on i?86-linux target rather than
x86_64-linux, then it won't be tested at all, and I guess on x86_64-linux
when not using RUNTESTFLAGS='--target_board=unix\{-m32,-m64\}' it won't be
tested either, because -m64 is then not explicitly passed (it is the
default).
> 
> >> --- gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c     (revision 0)
> >> +++ gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c     (revision 0)
> >> @@ -0,0 +1,16 @@
> >> +/* This test checks that we are no instrumenting a memory access twice
> >> +   (before and after inlining) */
> >> +
> >> +/* { dg-do run } */
> >> +/* { dg-options "-Wno-attributes" } */
> >> +/* { dg-skip-if "" { *-*-* }  { "*" } { "-O0 -m64" "-O1 -m64" } } */
> >
> > As I said above.  Why is this not tested for 32-bit testing?
> > From the name, -O0/-O1 limit could make sense, but then even for -O2 and
> > above it should do the same.
> >
> 
> I also copied it from llvm.

As unlike the gtest based tests, these tests are copied + modified, I think
we should just do what makes sense for GCC testing.  And, please do
something about always_inline here too (== no -Wno-attributes).  Best if you
could for each comment of mine grep for similar things elsewhere in the
patch, I've commented only on some of the occurences, some things happen
in lots of testcases.

	Jakub

  parent reply	other threads:[~2012-12-03 19:44 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-28  9:15 Wei Mi
2012-11-28 10:10 ` Konstantin Serebryany
2012-11-28 10:25   ` Jakub Jelinek
2012-11-28 10:41     ` Konstantin Serebryany
2012-11-28 11:03       ` Jakub Jelinek
2012-11-28 11:14         ` Konstantin Serebryany
2012-11-29 20:59           ` [PATCH] asan_test.cc from llvm Jakub Jelinek
2012-11-30  9:35             ` Konstantin Serebryany
2012-11-30 10:22               ` Jakub Jelinek
2012-11-30 10:55                 ` Konstantin Serebryany
2012-11-30 14:52                   ` Jakub Jelinek
2012-11-30 16:06                     ` Jakub Jelinek
     [not found]                       ` <CAKOQZ8y70goUL91pQJt_S=8W+Dn5VTZ5oRphvGuFwMMh41mkLg@mail.gmail.com>
2012-11-30 16:34                         ` Jakub Jelinek
2012-12-03  7:07                           ` Konstantin Serebryany
2012-12-03  9:18                             ` Jakub Jelinek
2012-12-03  9:52                               ` Konstantin Serebryany
2012-12-03 11:05                                 ` Jakub Jelinek
2012-12-03 11:42                                   ` Konstantin Serebryany
2012-11-28 11:25         ` [PATCH] asan unit tests from llvm lit-test Jakub Jelinek
2012-11-28 11:39           ` Konstantin Serebryany
2012-11-28 10:14 ` Jakub Jelinek
2012-11-30 21:05   ` Wei Mi
2012-12-03  7:16     ` Konstantin Serebryany
2012-12-03 11:01     ` Jakub Jelinek
2012-12-03 18:33       ` Wei Mi
2012-12-03 18:49         ` Konstantin Serebryany
2012-12-03 19:44         ` Jakub Jelinek [this message]
2012-12-03 19:09       ` Mike Stump
2012-12-03 19:37         ` Jakub Jelinek
2012-12-03 19:50           ` Mike Stump
     [not found]             ` <CAN=P9pgjjq66KS2DVkuOSeH2ejQPDcyKhwz5MdKyE3RB64E=xw@mail.gmail.com>
2012-12-04  7:34               ` Jakub Jelinek
2012-12-04 18:01       ` Wei Mi
2012-12-05 12:29         ` [PATCH] asan unit tests from llvm lit-test incremental changes Jakub Jelinek
2012-12-12 21:32           ` Dodji Seketeli
2012-12-12 21:31             ` Jakub Jelinek
2012-12-13  7:44               ` Konstantin Serebryany
2012-12-13  8:37                 ` Jakub Jelinek
2012-12-13 10:23                   ` Konstantin Serebryany
2012-12-13 15:22                     ` Jakub Jelinek
2012-12-05 23:29         ` [asan] Fix up dg-set-target-env-var Jakub Jelinek
2012-12-06  0:23           ` Mike Stump

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=20121203194441.GE2315@tucnak.redhat.com \
    --to=jakub@redhat.com \
    --cc=davidxl@google.com \
    --cc=dnovillo@google.com \
    --cc=dseketel@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=kcc@google.com \
    --cc=mikestump@comcast.net \
    --cc=wmi@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).