On 9/3/15 10:17 AM, Jakub Jelinek wrote:
On Thu, Sep 03, 2015 at 10:15:02AM -0600, Jonathan Roelofs wrote:
+kcc, mrs
Ping
On 8/27/15 4:44 PM, Jonathan Roelofs wrote:
The attached patch makes the ubsan tests agnostic to ansi escape codes
in their diagnostic output.
It wouldn't hurt if you explained in detail what is the problem you are
trying to solve and why something that works for most people doesn't work in
your case.
Hi Jakub,
AFAICT, there are two ways to suppress the emission of color codes from
ubsan's diagnostics:
1) Set an environment variable.
2) Make the output stream not a tty.
#1 doesn't seem to be possible in DejaGnu without hacks.
#2 doesn't work in our environment because DejaGnu attempts to make
itself appear to the program under test as if it were a tty. This might
be an artifact of the fact that all of our testing is remote testing
(though that is just blind speculation on my part: I'm not familiar with
how others have their testing set up, nor whether they do remote testing
of the sanitizer runtimes).
Moral of the story is: these tests fail in our environment, but only
because the regexes do not expect the presence of the ansi color codes,
and we can't trick the runtime into not emitting them.
Cheers,
Jon
Tested on an x86_64-linux-gnu target.
2015-08-27 Jonathan Roelofs <jonat...@codesourcery.com>
* c-c++-common/ubsan/align-2.c: Don't be picky about ansi escape
codes in diagnostics.
* c-c++-common/ubsan/align-4.c: Ditto.
* c-c++-common/ubsan/align-6.c: Ditto.
* c-c++-common/ubsan/align-7.c: Ditto.
* c-c++-common/ubsan/align-9.c: Ditto.
* c-c++-common/ubsan/float-cast-overflow-2.c: Ditto.
* c-c++-common/ubsan/float-cast-overflow-8.c: Ditto.
* c-c++-common/ubsan/object-size-1.c: Ditto.
* c-c++-common/ubsan/object-size-10.c: Ditto.
* c-c++-common/ubsan/object-size-4.c: Ditto.
* c-c++-common/ubsan/object-size-5.c: Ditto.
* c-c++-common/ubsan/object-size-7.c: Ditto.
* c-c++-common/ubsan/object-size-8.c: Ditto.
* c-c++-common/ubsan/object-size-9.c: Ditto.
* c-c++-common/ubsan/overflow-int128.c: Ditto.
* c-c++-common/ubsan/pr63802.c: Ditto.
I do not have write access, so I'll need someone to commit this for me
if it is approved.
Jakub
--
Jon Roelofs
jonat...@codesourcery.com
CodeSourcery / Mentor Embedded