From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14099 invoked by alias); 25 Feb 2010 16:03:36 -0000 Received: (qmail 13954 invoked by uid 22791); 25 Feb 2010 16:03:34 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RDNS_DYNAMIC X-Spam-Check-By: sourceware.org Received: from 74-93-104-97-Washington.hfc.comcastbusiness.net (HELO sunset.davemloft.net) (74.93.104.97) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Feb 2010 16:03:30 +0000 Received: from localhost (localhost [127.0.0.1]) by sunset.davemloft.net (Postfix) with ESMTP id D8CB024C096 for ; Thu, 25 Feb 2010 08:03:47 -0800 (PST) Date: Thu, 25 Feb 2010 16:03:00 -0000 Message-Id: <20100225.080347.123279217.davem@davemloft.net> To: gdb-patches@sourceware.org Subject: [PATCH]: Enable catch syscall test on sparc From: David Miller Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: 2010-02/txt/msg00619.txt.bz2 Now that these sparc targets support this feature we can enable the test in the testsuite. While doing this I also noticed that the logic for setting the all_syscalls_numbers array was wrong, the test always evaluates to true because it goes: if (!ARCH1 || !ARCH2 || ... instead of the correct: if (ARCH1 || ARCH2 || ... so that gets fixed here too. Ok to commit? gdb: Enable catch syscall test on sparc*-*-liunx and fix logic bug. gdb/testsuite/ 2010-02-25 David S. Miller * gdb.base/catch-syscall.exp: Allow to run on sparc*-*-linux and fix logic for setting all_syscalls_numbers. --- gdb/testsuite/gdb.base/catch-syscall.exp | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp index 4d5c3cb..ee385ad 100644 --- a/gdb/testsuite/gdb.base/catch-syscall.exp +++ b/gdb/testsuite/gdb.base/catch-syscall.exp @@ -54,7 +54,8 @@ if {![istarget "hppa*-hp-hpux*"] && ![istarget "*-linux*"]} then { # on some architecture. #if { ![istarget "i\[34567\]86-*-linux*"] if { ![istarget "x86_64-*-linux*"] && ![istarget "i\[34567\]86-*-linux*"] - && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"] } { + && ![istarget "powerpc-*-linux*"] && ![istarget "powerpc64-*-linux*"] + && ![istarget "sparc-*-linux*"] && ![istarget "sparc64-*-linux*"] } { continue } @@ -415,10 +416,11 @@ proc do_syscall_tests_without_xml {} { proc fill_all_syscalls_numbers {} { global all_syscalls_numbers - # For Linux on x86, PPC and PPC64, the numbers for the syscalls "close" and - # "chroot" are the same. - if { ![istarget "i\[34567\]86-*-linux*"] - || ![istarget "powerpc-*-linux*"] || ![istarget "powerpc64-*-linux*"] } { + # For Linux on x86, PPC, PPC64, SPARC and SPARC64, the numbers for the syscalls + # "close" and "chroot" are the same. + if { [istarget "i\[34567\]86-*-linux*"] + || [istarget "powerpc-*-linux*"] || [istarget "powerpc64-*-linux*"] + || [istarget "sparc-*-linux*"] || [istarget "sparc64-*-linux*"] } { set all_syscalls_numbers { "6" "61" } } } -- 1.6.6.1