From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32766 invoked by alias); 3 Dec 2012 19:44:53 -0000 Received: (qmail 32753 invoked by uid 22791); 3 Dec 2012 19:44:53 -0000 X-SWARE-Spam-Status: No, hits=-6.2 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_SPAMHAUS_DROP,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS,TW_LV X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Dec 2012 19:44:46 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qB3Jiieh000327 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 3 Dec 2012 14:44:44 -0500 Received: from zalov.redhat.com (vpn1-5-203.ams2.redhat.com [10.36.5.203]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qB3JigSZ013526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 3 Dec 2012 14:44:44 -0500 Received: from zalov.cz (localhost [127.0.0.1]) by zalov.redhat.com (8.14.5/8.14.5) with ESMTP id qB3JigIn012347; Mon, 3 Dec 2012 20:44:42 +0100 Received: (from jakub@localhost) by zalov.cz (8.14.5/8.14.5/Submit) id qB3Jift7012346; Mon, 3 Dec 2012 20:44:41 +0100 Date: Mon, 03 Dec 2012 19:44:00 -0000 From: Jakub Jelinek To: Wei Mi Cc: Mike Stump , GCC Patches , David Li , Diego Novillo , Kostya Serebryany , Dodji Seketeli Subject: Re: [PATCH] asan unit tests from llvm lit-test Message-ID: <20121203194441.GE2315@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20121128101420.GG2315@tucnak.redhat.com> <20121203110018.GR2315@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00161.txt.bz2 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