This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Asan/Tsan Unit/Regression testing (was [asan] Emit GIMPLE direclty, small cleanups)
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- Cc: Andrew Pinski <pinskia at gmail dot com>, Jakub Jelinek <jakub at redhat dot com>, Wei Mi <wmi at google dot com>, Kostya Serebryany <kcc at google dot com>, Xinliang David Li <davidxl at google dot com>, Diego Novillo <dnovillo at google dot com>, Rainer Orth <ro at cebitec dot uni-bielefeld dot de>, Dodji Seketeli <dseketel at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Nov 2012 09:37:56 -0800
- Subject: Re: Asan/Tsan Unit/Regression testing (was [asan] Emit GIMPLE direclty, small cleanups)
- References: <CAAkRFZLxG26T_MtiL3XHiOa9EKKPyBnH5J4Nk5OKzBPGEqNgAw@mail.gmail.com> <CAN=P9pj+4-UuZjLYO1t39UqNQrhnFJu0amkKbjWXTXxDHzzzqw@mail.gmail.com> <20121109144642.GD1886@tucnak.redhat.com> <CAN=P9phtd=LN-=hYx4koDnXn0tfwN9gnQvZt2Z9rjS9T+3OYaA@mail.gmail.com> <CA+4CFy6V+9gBjrbdJdzHmsegcLqY1VvJ8r3GCmkU30hxjy6yVQ@mail.gmail.com> <20121109191312.GG1886@tucnak.redhat.com> <CA+4CFy5711DN7R_o=SPLYsVzr3kfhE1rc33vyUetvpaN3oCNvw@mail.gmail.com> <20121112180550.GR1886@tucnak.redhat.com> <CA+=Sn1=GyzX-NGtjCaOYQP+qtFQKcq0KZuzAyHT4O4H4w8Z57A@mail.gmail.com> <CAGQ9bdzhmnPHvKQwm73p6+gCSKVFSshswcwGcPrmQ=dPi5h1zQ@mail.gmail.com>
On Mon, Nov 12, 2012 at 10:37 AM, Konstantin Serebryany
<konstantin.s.serebryany@gmail.com> wrote:
> Hi,
> I don't insist that we use gtest for gcc-asan, I just say that this is
> the simplest approach to get 2.5K test suite into gcc,
> and the only approach my team will be able to maintain.
>
> gtest is not as portable as the rest of gcc, but neither is asan
> run-time library (which is more platform-specific than gtest).
>
> On Mon, Nov 12, 2012 at 10:08 AM, Andrew Pinski <pinskia@gmail.com> wrote:
>> On Mon, Nov 12, 2012 at 10:05 AM, Jakub Jelinek <jakub@redhat.com> wrote:
>>> On Mon, Nov 12, 2012 at 09:32:04AM -0800, Wei Mi wrote:
>>>> Using setjmp/longjmp to do multiple tests in a single testfile, the
>>>> test statements in the front could affect the tests in the back. gtest
>>>> will fork a new process for every test statement. The forked process
>>>> will do only one test and skip all the other test statements. That is
>>>> to say, multiple test statements in the same testfile are guaranteed
>>>> to be independent from each other in gtest. If we use setjmp/longjmp
>>>> pattern to do the test, existing testsuite may need to be rewritten if
>>>> their test statements could affect each other.
>>>
>>> So you can either run the program multiple times from within dejagnu, or
>>> fork inside of the macros. In any case, adding > 5MB of gtest just for that
>>> single test or two is IMHO really too much, and similarly adding gtest
>>> as another requirement to build gcc. Does gtest support all the targets
>>> that gcc does btw?
>>
>> Also does gtest support cross testing; that is testing over rsh/ssh
>> and testing via a simulator?
>
> I see no reason why gtest will not work via ssh or in simulator.
>
Does gtest support testing different compiler options? I am
using
make check RUNTESTFLAGS="--target_board='unix{-mx32,-mx32,}'"
on Linux/x86-64 to test ia32, x32 as well as x86-64.
--
H.J.