From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23845 invoked by alias); 19 May 2011 08:16:01 -0000 Received: (qmail 23836 invoked by uid 22791); 19 May 2011 08:16:00 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from sibelius.xs4all.nl (HELO glazunov.sibelius.xs4all.nl) (83.163.83.176) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 19 May 2011 08:15:44 +0000 Received: from glazunov.sibelius.xs4all.nl (kettenis@localhost [127.0.0.1]) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3) with ESMTP id p4J8EOAK024431; Thu, 19 May 2011 10:14:24 +0200 (CEST) Received: (from kettenis@localhost) by glazunov.sibelius.xs4all.nl (8.14.3/8.14.3/Submit) id p4J8EMYF020774; Thu, 19 May 2011 10:14:22 +0200 (CEST) Date: Thu, 19 May 2011 08:16:00 -0000 Message-Id: <201105190814.p4J8EMYF020774@glazunov.sibelius.xs4all.nl> From: Mark Kettenis To: yao@codesourcery.com CC: gdb-patches@sourceware.org In-reply-to: <4DD49BE7.80206@codesourcery.com> (message from Yao Qi on Thu, 19 May 2011 12:26:15 +0800) Subject: Re: [_Complex test 1/4] support_complex_tests in gdb.exp and pass _Complex args to func References: <4DC401D0.1050500@codesourcery.com> <4DC75036.4040806@codesourcery.com> <4DD49BE7.80206@codesourcery.com> Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-05/txt/msg00424.txt.bz2 > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index 531120c..8be8396 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -1486,6 +1486,21 @@ proc skip_shlib_tests {} { > return 1 > } > > +# Return a 1 if we should run tests to _Complex types, otherwise, skip it. > + > +proc support_complex_tests {} { > + # In order to avoid breaking test on platforms not supporting _Complex, > + # the list of target triplet supporting tests to _Complex type is still > + # conservative. More target triplet can be added here if we are sure > + # _Complex type is supported. > + if {[istarget *-*-linux*] > + || [istarget *-*-elf*]} { > + return 1; Sorry, but this is wrong on many levels. For one thing, _Complex support has very little to do with with the OS you're running. It's primarily a compiler issue. So you should probably use a test based on test_compiler_info here. The GCC C99 status page suggests that the first release to properly support complex is GCC 4.5. Earlier versions are marked as "broken" but may actually have enough support for these simple tests. The other thing is that the testsuite should not be "conservative". We should run as many tests as possible on as many platforms as possible. Tests that are known to fail should be KFAILed (if there is a known bug/issue with GDB itself) or XFAILed (if there is an issue with the platform). Only if running the tests causes serious problems (crashing the OS, causing excessive timeouts) we should consider skipping them.