From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32495 invoked by alias); 27 Nov 2012 19:09:16 -0000 Received: (qmail 32482 invoked by uid 22791); 27 Nov 2012 19:09:15 -0000 X-SWARE-Spam-Status: No, hits=-6.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Nov 2012 19:09:09 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id qARJ95Ip009319 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 27 Nov 2012 14:09:05 -0500 Received: from barimba (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id qARJ93lX002136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 27 Nov 2012 14:09:04 -0500 From: Tom Tromey To: Mircea Gherzan Cc: gdb-patches@sourceware.org, keven.boell@intel.com, marc.khouzam@ericsson.com, vladimir@codesourcery.com Subject: Re: [PATCH v6 3/3] MI: tests for -catch-load/-catch-unload References: <1354031591-20226-1-git-send-email-mircea.gherzan@intel.com> <1354031591-20226-3-git-send-email-mircea.gherzan@intel.com> Date: Tue, 27 Nov 2012 19:09:00 -0000 In-Reply-To: <1354031591-20226-3-git-send-email-mircea.gherzan@intel.com> (Mircea Gherzan's message of "Tue, 27 Nov 2012 16:53:11 +0100") Message-ID: <87k3t6dfsg.fsf@fleche.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain 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: 2012-11/txt/msg00775.txt.bz2 >>>>> "Mircea" == Mircea Gherzan writes: Mircea> +mi_gdb_test "333-exec-continue" ".*" "catch-unload: run" Mircea> + Mircea> +gdb_expect { Mircea> + -re ".*stopped.*reason=\"solib-event\".*removed=.*\r\n.*\r\n$mi_gdb_prompt$" { Mircea> + pass "catch-unload: solib-event stop" Mircea> + } Mircea> + -re ".*\r\n$mi_gdb_prompt$" { Mircea> + fail "catch-unload: solib-event stop" Mircea> + } Mircea> + timeout { Mircea> + fail "(timeout) catch-unload: solib-event stop" Mircea> + } Mircea> +} I am not sure but this kind of thing seems racy to me. Can't that ".*" in the mi_gdb_test suck up an arbitrary amount of gdb output, perhaps enough to cause gdb_expect not to see the data it needs to match? I think some other approach is needed. Tom