From patchwork Fri May 9 14:39:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yao Qi X-Patchwork-Id: 860 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id B867B36007A for ; Fri, 9 May 2014 07:43:07 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14314964) id 6641456C2008; Fri, 9 May 2014 07:43:07 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx22.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id 425D95630A91 for ; Fri, 9 May 2014 07:43:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=tBor20oKIwnhdMeFaLluiwu4PKLbk E7cMeSnypFWoP3zBXqET5IR3qSDsFZMebCjq4gTqIVlqBkbuf17soQLB505oSoDh 9PmDARnr2gHsjCfPD+KcG8p4OklfEtI4LYG8BMYNttnuZz15VPZAK7b/wl7VvoAw NFPHs/RGqtW2b4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=SswbE3BYIlvVGB2fQvkaQYqxhQs=; b=uSd 6p+2T1XgSqvn1Ult4wO5CM5VHaLaAiJ1pjITTxmrA2Y734AfKxN7JfPuE6wFrsQW 9G6b/HoJfSBxjubknhK5Ut0WuhmX2C/IzqgnIHqe4HKja3k7i802gha/X9SYpWQN njMTYrVCF53uJPIo1sxzBHdl49Z7xJf1rZC9rE4k= Received: (qmail 13138 invoked by alias); 9 May 2014 14:43:05 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 13128 invoked by uid 89); 9 May 2014 14:43:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 May 2014 14:43:04 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1Wim0q-0006Co-VN from Yao_Qi@mentor.com for gdb-patches@sourceware.org; Fri, 09 May 2014 07:43:01 -0700 Received: from SVR-ORW-FEM-06.mgc.mentorg.com ([147.34.97.120]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 9 May 2014 07:43:00 -0700 Received: from qiyao.dyndns.org.com (147.34.91.1) by SVR-ORW-FEM-06.mgc.mentorg.com (147.34.97.120) with Microsoft SMTP Server id 14.2.247.3; Fri, 9 May 2014 07:43:00 -0700 From: Yao Qi To: Subject: [PATCH] Set timeout for gdb.reverse/*.exp test cases Date: Fri, 9 May 2014 22:39:57 +0800 Message-ID: <1399646397-32587-1-git-send-email-yao@codesourcery.com> MIME-Version: 1.0 X-IsSubscribed: yes X-DH-Original-To: gdb@patchwork.siddhesh.in Hi, This patch is to add a new board setting gdb_reverse_timeout, which is used to set timeout for all gdb.reverse test cases, which are usually very slow and cause some TIMEOUT failures, for example, on some arm boards. We have some alternatives to this approach, but I am not satisfied with them: - Increase the timeout value. This is the global change, and it may cause some delay where actual failures happen. - Set timeout by gdb_reverse_timeout in every gdb.reverse/*.exp. Then, we have to touch every file under gdb.reverse. In this patch, we choose a central place to set timeout for all tests in gdb.reverse, which is convenient. gdb/testsuite: 2014-05-09 Yao Qi * lib/gdb.exp (gdb_init): Set timeout if test file is under gdb.reverse directory and gdb_reverse_timeout exists in board setting. * README: Document gdb_reverse_timeout. --- gdb/testsuite/README | 9 +++++++++ gdb/testsuite/lib/gdb.exp | 5 +++++ 2 files changed, 14 insertions(+) diff --git a/gdb/testsuite/README b/gdb/testsuite/README index e6d5318..cbc4e20 100644 --- a/gdb/testsuite/README +++ b/gdb/testsuite/README @@ -203,6 +203,15 @@ The default value of the timeout is defined in the file `testsuite/config/unix.exp' (at least for Unix hosts; board files may have their own values). +gdb_reverse_timeout + +Defining this variable changes the default timeout duration when tests +under gdb.reverse directory are running. Process record and reverse +debugging is so slow that its tests have unexpected `TIMEOUT' test +failures. This global variable is useful to bump up the value of +`timeout' for gdb.reverse tests and doesn't cause any delay where +actual failure happen in the rest of the testsuite. + Board Settings ************** diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index aec86cd..24e2f23 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -3691,6 +3691,11 @@ proc gdb_init { test_file_name } { global timeout set timeout $gdb_test_timeout + if { [regexp ".*gdb\.reverse\/.*" $test_file_name] + && [target_info exists gdb_reverse_timeout] } { + set timeout [target_info gdb_reverse_timeout] + } + # If GDB_INOTIFY is given, check for writes to '.'. This is a # debugging tool to help confirm that the test suite is # parallel-safe. You need "inotifywait" from the