From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22148 invoked by alias); 3 Dec 2012 09:52:18 -0000 Received: (qmail 22134 invoked by uid 22791); 3 Dec 2012 09:52:17 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_KC,TW_LV X-Spam-Check-By: sourceware.org Received: from mail-la0-f47.google.com (HELO mail-la0-f47.google.com) (209.85.215.47) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 03 Dec 2012 09:52:12 +0000 Received: by mail-la0-f47.google.com with SMTP id u2so1964001lag.20 for ; Mon, 03 Dec 2012 01:52:11 -0800 (PST) Received: by 10.112.14.107 with SMTP id o11mr4055956lbc.98.1354528331117; Mon, 03 Dec 2012 01:52:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.135.105 with HTTP; Mon, 3 Dec 2012 01:51:50 -0800 (PST) In-Reply-To: <20121203091815.GP2315@tucnak.redhat.com> References: <20121129204636.GC2315@tucnak.redhat.com> <20121130101420.GE2315@tucnak.redhat.com> <20121130144602.GF2315@tucnak.redhat.com> <20121130155932.GG2315@tucnak.redhat.com> <20121130162525.GH2315@tucnak.redhat.com> <20121203091815.GP2315@tucnak.redhat.com> From: Konstantin Serebryany Date: Mon, 03 Dec 2012 09:52:00 -0000 Message-ID: Subject: Re: [PATCH] asan_test.cc from llvm To: Jakub Jelinek Cc: Ian Lance Taylor , Dodji Seketeli , gcc-patches@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 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/msg00103.txt.bz2 On Mon, Dec 3, 2012 at 1:18 PM, Jakub Jelinek wrote: > On Mon, Dec 03, 2012 at 11:06:48AM +0400, Konstantin Serebryany wrote: >> This patch copies the asan tests almost, but not quite, verbatim from upstream. >> Since the patch is not in attachment (and gmail messes up with inlined >> patches) I can't see the exact changes. > > Sending patches inline rather than as attachments is the preferred way for > gcc-patches, you can always grab it from the gcc-patches ml archive: > http://gcc.gnu.org/ml/gcc-patches/2012-11/msg02557.html > (then click on Raw text). Got it, thanks. > > I'm attaching the diff for asan_test.cc from llvm anyway. > >> I see #ifdef ASAN_AVOID_EXPENSIVE_TESTS, which I don't really like >> because I'd rather fix the test than disable it. > > The test isn't disabled, just by default limited to 30 threads instead of > 1000, because that really will ruin testing for everybody with ulimit -u > in 1024-ish range. Even 500 threads would be undesirable for that. Which is the same as disabling it. Unfortunately, we don't have a good automated way to test asan performance, so this test is guarding us from performance degradation in the asan's pthread wrappers. If there is a bug there, we may not notice it on 30 threads, but may (with a high probability) on 1000 threads. Anyway, does http://llvm.org/viewvc/llvm-project?rev=169118&view=rev solve the problem? It adds ASAN_AVOID_EXPENSIVE_TESTS and checks the results of all pthread_{create,join} calls in tests. --kcc > >> Can we commit the tests 100% verbatim, and then fix them as separate commits >> (preferably, by fixing the tests upstream and doing the merge with >> libsanitizer/merge.sh)? > > I'd prefer delay committing the patch over causing random testsuite failures > elsewhere. > > Jakub