From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24189 invoked by alias); 2 Jun 2016 15:30:24 -0000 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 Received: (qmail 24167 invoked by uid 89); 2 Jun 2016 15:30:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=eating X-HELO: mail-qg0-f46.google.com Received: from mail-qg0-f46.google.com (HELO mail-qg0-f46.google.com) (209.85.192.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Thu, 02 Jun 2016 15:30:13 +0000 Received: by mail-qg0-f46.google.com with SMTP id 52so60357050qgy.0 for ; Thu, 02 Jun 2016 08:30:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=yAv4dYJygu+5x3h/0smVG2NaCAvxQRMdpLImt5oX2mo=; b=f4YntaVqUPLC1ICNmej8bbT5ZbSWZXU7VBIgv5nl8q4TritmePRq3ZFDxV/Ddc7EDU vLGQMMl0SwWqTbx6+QXCOOAC+4GF36dJbJxakTcvMUMblV9CAWsInyOR3KzXZF9YLdBw IopC9g34JIK2GYCcArtAEaIlkC5FuzrVeyhjgFqz2YgGSklysqU8Vpy4Vp+7npOHZ/3T lNwYVljUwu+NeKbbFVr0al8nf8ronjuvgJO7z+wgQXuk/4mr34UTKq7M7A44Hk4zWq/Y LJTl6iwsNDtUONE8IwFeeZTgDQgBBa4sWUbrWnnctDB2xoPY29wSz9lGAul1AEOnppzd LmrQ== X-Gm-Message-State: ALyK8tJxkxaQA2NdYO1EQVG+MRMpWpR/J1Yznl4pjLE6vL8fnfX8EvocmZb2dX5lX8mWL7JsEBjC6tFd/VS1lNoc MIME-Version: 1.0 X-Received: by 10.140.226.71 with SMTP id w68mr44763701qhb.51.1464881409661; Thu, 02 Jun 2016 08:30:09 -0700 (PDT) Received: by 10.140.39.47 with HTTP; Thu, 2 Jun 2016 08:30:09 -0700 (PDT) In-Reply-To: <20160602150411.GK28550@tucnak.redhat.com> References: <20160429071744.GX26501@tucnak.zalov.cz> <20160505232654.GW21574@panther> <5731C6B3.3070903@redhat.com> <20160512003651.GB17273@panther> <57344A09.7030901@redhat.com> <20160513170930.GN17273@panther> <574F0D5F.7000501@redhat.com> <574F1483.6030806@ubuntu.com> <20160602150411.GK28550@tucnak.redhat.com> Date: Thu, 02 Jun 2016 15:30:00 -0000 Message-ID: Subject: Re: Allow embedded timestamps by C/C++ macros to be set externally (3) From: Christophe Lyon To: Jakub Jelinek Cc: Matthias Klose , Bernd Schmidt , Dhole , Eduard Sanou , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00182.txt.bz2 On 2 June 2016 at 17:04, Jakub Jelinek wrote: > On Thu, Jun 02, 2016 at 04:49:59PM +0200, Christophe Lyon wrote: >> I'm also seeing that the new gcc.dg/cpp/source_date_epoch-1.c fails because >> the output pattern finishes with '\n' instead of the usual '(\n|\r\n|\r)' >> >> Can I add this as obvious? > > Some remote test invocations even eat the final newline from what I vaguely > remember from various complains about the asan and ubsan testsuite. > Yes, that's a nightmare :) Also when combined with qemu, in my configuration it thinks that stderr is a tty so *san tests use the colorization codes. And when it comes to cross-testing as we do it in Linaro, we have problems with dejagnu eating the trailing \n in the remote execution functions. But that's another different problem. > So we could just drop that ^ and \n$ from dg-output, but then, what is the > point of using dg-output at all here? > > Isn't following just better? Tested on x86_64-linux, ok for trunk? LGTM Thanks > 2016-06-02 Jakub Jelinek > > * gcc.dg/cpp/source_date_epoch-1.c (main): Test __DATE__ and > __TIME__ strings with __builtin_strcmp instead of printf and > dg-output. > > --- gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c.jj 2016-06-01 21:26:27.000000000 +0200 > +++ gcc/testsuite/gcc.dg/cpp/source_date_epoch-1.c 2016-06-02 17:02:06.164281564 +0200 > @@ -2,10 +2,10 @@ > /* { dg-set-compiler-env-var SOURCE_DATE_EPOCH "630333296" } */ > > int > -main(void) > +main () > { > - __builtin_printf ("%s %s\n", __DATE__, __TIME__); > + if (__builtin_strcmp (__DATE__, "Dec 22 1989") != 0 > + || __builtin_strcmp (__TIME__, "12:34:56") != 0) > + __builtin_abort (); > return 0; > } > - > -/* { dg-output "^Dec 22 1989 12:34:56\n$" } */ > > > Jakub