From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19939 invoked by alias); 23 Oct 2013 14:04:33 -0000 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 Received: (qmail 19926 invoked by uid 89); 23 Oct 2013 14:04:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS,UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: userp1040.oracle.com Received: from userp1040.oracle.com (HELO userp1040.oracle.com) (156.151.31.81) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Wed, 23 Oct 2013 14:04:32 +0000 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r9NE4TNc013966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Wed, 23 Oct 2013 14:04:30 GMT Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9NE4T4j024120 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 23 Oct 2013 14:04:29 GMT Received: from abhmt120.oracle.com (abhmt120.oracle.com [141.146.116.72]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r9NE4Tog028653 for ; Wed, 23 Oct 2013 14:04:29 GMT Received: from termi.oracle.com (/10.175.28.50) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 23 Oct 2013 07:04:28 -0700 From: jose.marchesi@oracle.com (Jose E. Marchesi) To: gdb-patches@sourceware.org Subject: [PATCH] testsuite: sigall.exp: handle SIGLOST/SIGPWR conflict in sparc64 targets Date: Wed, 23 Oct 2013 14:04:00 -0000 Message-ID: <877gd4t72x.fsf@oracle.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2013-10/txt/msg00719.txt.bz2 Hi. In sparc64 SIGLOST and SIGPWR have the same signal number. The following patch fixes gdb.base/sigall.exp accordingly. Tested in sparc64-unknown-linux-gnu. 2013-10-23 Jose E. Marchesi * gdb.base/sigall.exp (test_one_sig): gdb identifies SIGLOST as a SIGPWR in sparc64. * gdb.base/sigall.c (main): In some targets SIGLOST and SIGPWR have the same signal number. Handle this situation. diff --git a/gdb/testsuite/gdb.base/sigall.c b/gdb/testsuite/gdb.base/sigall.c index 110029d..68f3ecb 100644 --- a/gdb/testsuite/gdb.base/sigall.c +++ b/gdb/testsuite/gdb.base/sigall.c @@ -1083,7 +1083,7 @@ return 0; int gen_PWR () { -#ifdef SIGPWR +#if defined(SIGPWR) && (!defined (SIGLOST) || SIGPWR != SIGLOST) kill (getpid (), SIGPWR); #else handle_PWR (0); @@ -1662,7 +1662,7 @@ main () #ifdef SIGUSR2 signal (SIGUSR2, handle_USR2); #endif -#ifdef SIGPWR +#if defined(SIGPWR) && (!defined (SIGLOST) || SIGPWR != SIGLOST) signal (SIGPWR, handle_PWR); #endif #if defined (SIGPOLL) && (!defined (SIGIO) || SIGPOLL != SIGIO) diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp index b1b8597..4bfb199 100644 --- a/gdb/testsuite/gdb.base/sigall.exp +++ b/gdb/testsuite/gdb.base/sigall.exp @@ -39,12 +39,20 @@ proc test_one_sig {nextsig} { set need_another_continue 1 set missed_handler 0 if $this_sig_supported then { + set esig $thissig + if { $thissig == "IO" } { setup_xfail "i*86-pc-linuxoldld-gnu" "i*86-pc-linuxaout-gnu" } + # In SPARC64 systems SIGLOST==SIGPWR and gdb identifies the raised + # signal as PWR. + if { $thissig == "LOST" && [ istarget "sparc64-*-linux*" ] } then { + set esig "PWR" + } + gdb_test "continue" \ - "Continuing.*Program received signal SIG$thissig.*" \ - "get signal $thissig" + "Continuing.*Program received signal SIG$esig.*" \ + "get signal $esig" } if [ istarget "alpha-dec-osf3*" ] then { # OSF/1-3.x is unable to continue with a job control stop signal.