From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29075 invoked by alias); 9 Jan 2014 21:21:27 -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 29063 invoked by uid 89); 9 Jan 2014 21:21:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 09 Jan 2014 21:21:25 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s09LLOB6012766 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 9 Jan 2014 16:21:24 -0500 Received: from psique (ovpn-113-176.phx2.redhat.com [10.3.113.176]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s09LLLUd006432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Thu, 9 Jan 2014 16:21:22 -0500 From: Sergio Durigan Junior To: GDB Patches Subject: [PATCH] Fix gdb.trace/mi-traceframe-changed.exp to check for target trace support X-URL: http://www.redhat.com Date: Thu, 09 Jan 2014 21:21:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2014-01/txt/msg00260.txt.bz2 Hi, This patch is related to one of the "regressions" that I reported on the GDB 7.7 testing thread. While investigating the issue, I found that gdb.trace/mi-traceframe-changed.exp was running without actually checking if the target supported tracing or not. So I wrote this patch to fix the issue. It is now reporting the test as unsupported on s390x when run without gdbserver. When I run it with gdbserver, yet another error happens that prevents the testcase to test if the target supports tracing, but it is unrelated to the "regression" and happens with other testcases as well. OK to apply? -- Sergio gdb/testsuite 2014-01-09 Sergio Durigan Junior * gdb.trace/mi-traceframe-changed.exp: Test if the target supports tracing before running the test. Use prepare_for_testing instead of gdb_compile. diff --git a/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp b/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp index 4bcf379..b5380c5 100644 --- a/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp +++ b/gdb/testsuite/gdb.trace/mi-traceframe-changed.exp @@ -14,8 +14,6 @@ # along with this program. If not, see . load_lib trace-support.exp -load_lib mi-support.exp -set MIFLAGS "-i=mi" standard_testfile tfile.c set executable $testfile @@ -30,15 +28,30 @@ if {![is_remote host] && ![is_remote target]} { set purely_local 0 } -if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ - executable \ - [list debug nowarnings \ - "additional_flags=-DTFILE_DIR=\"$tfile_dir\""]] \ - != "" } { - untested ${testfile}.exp - return -1 +if { [prepare_for_testing $testfile.exp $testfile $srcfile \ + [list debug nowarnings additional_flags=-DTFILE_DIR="${tfile_dir}"]] } { + untested $testfile.exp + return -1 } +# Testing if the target supports tracing. +if { ![runto_main] } { + fail "Cannot test if target supports tracing" + return -1 +} + +if { ![gdb_target_supports_trace] } { + unsupported "Current target does not support trace" + return -1 +} + +gdb_exit + +load_lib mi-support.exp +set MIFLAGS "-i=mi" + +mi_gdb_start + # Make sure we are starting fresh. remote_file host delete $tfile_basic remote_file target delete $tfile_basic