From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 93926 invoked by alias); 28 Jul 2019 02:56:19 -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 93913 invoked by uid 89); 28 Jul 2019 02:56:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-6.6 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.1 spammy= X-HELO: gateway31.websitewelcome.com Received: from gateway31.websitewelcome.com (HELO gateway31.websitewelcome.com) (192.185.143.38) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 28 Jul 2019 02:56:16 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway31.websitewelcome.com (Postfix) with ESMTP id 64E8210ED4 for ; Sat, 27 Jul 2019 21:56:14 -0500 (CDT) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id rZM6hHwwt4FKprZM6hS4aa; Sat, 27 Jul 2019 21:56:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=E4/2PMRosTsQVqkGxaRKARj2zU7LQaEdJoc6FYSKjPw=; b=cx9JYmKaGW8cbSgpS4nqS1vKVy 4C6sTinuJML9uG+RmsyCmrVW92vtkuGPY+68ZPvX+p62+SrYO5+LhYTbP4V+IuNmWqE3hkY/vDcHN DiKVCk24R6ikHpwJS7PEZQveQ; Received: from 97-122-178-82.hlrn.qwest.net ([97.122.178.82]:47830 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92) (envelope-from ) id 1hrZM5-003DvD-TC; Sat, 27 Jul 2019 21:56:14 -0500 From: Tom Tromey To: Andrew Burgess Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH v2 1/8] A virtual terminal for the test suite References: <20190726185134.1856-1-tom@tromey.com> <20190726185134.1856-2-tom@tromey.com> <20190727160139.GL23204@embecosm.com> Date: Sun, 28 Jul 2019 02:56:00 -0000 In-Reply-To: <20190727160139.GL23204@embecosm.com> (Andrew Burgess's message of "Sat, 27 Jul 2019 17:01:39 +0100") Message-ID: <87tvb6j29f.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.91 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2019-07/txt/msg00628.txt.bz2 >>>>> "Andrew" == Andrew Burgess writes: Andrew> I took a look through the whole series and it all looks good. I did Andrew> have one observation, see below... >> +Term::command "list main" >> +set text [Term::get_all_lines] >> +gdb_assert {[regexp "21 *return 0" $text]} "list main" Andrew> This pattern of 'Term::get_all_lines' followed by a regexp check crops Andrew> up a lot throughout the series. I wonder if there's any merit in Andrew> providing a wrapper, something like: Andrew> Term::command "list main" Andrew> gdb_assert {[Term::regexp "21 *return 0"]} "list main" Andrew> Just an idea. Good idea. Actually I think I will shorten it even further to something like Term::check_contents $regexp $testname If this works out adequately, I plan to push it in. thanks, Tom