From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id DFE963855002 for ; Wed, 23 Jun 2021 21:51:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org DFE963855002 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de Received: from imap.suse.de (imap-alt.suse-dmz.suse.de [192.168.254.47]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id C0D021FD66; Wed, 23 Jun 2021 21:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624485093; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPY0gQFBqiltsewOZP14uA8z6Odpr4ZkNPQMudWxWlA=; b=nDA6mc/DLXY5HrVHji61eufTD8MAzEQvgyaNFP+GDT4O9BPGSNhAhfPF0Cf7NFqxPbpLmT vzE2MaIM19hKc/IWOD+2V5028LHJLzQV4O8xFOR3C9A/O3sxZ+sHZHf+xtczYNFw7mQYBS pD34SQnFRNjN26BBK/4Do+h2NRcPYxA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624485093; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPY0gQFBqiltsewOZP14uA8z6Odpr4ZkNPQMudWxWlA=; b=HWHVri23lvxhhUOIlY6Pkv6f6yumm85T3iXs8VOeOZktqv6vGJtE3jNuwlTX6bp0zQHBuh TAxdvKd319kJohAw== Received: from imap3-int (imap-alt.suse-dmz.suse.de [192.168.254.47]) by imap.suse.de (Postfix) with ESMTP id 9DE0511A97; Wed, 23 Jun 2021 21:51:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1624485093; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPY0gQFBqiltsewOZP14uA8z6Odpr4ZkNPQMudWxWlA=; b=nDA6mc/DLXY5HrVHji61eufTD8MAzEQvgyaNFP+GDT4O9BPGSNhAhfPF0Cf7NFqxPbpLmT vzE2MaIM19hKc/IWOD+2V5028LHJLzQV4O8xFOR3C9A/O3sxZ+sHZHf+xtczYNFw7mQYBS pD34SQnFRNjN26BBK/4Do+h2NRcPYxA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1624485093; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vPY0gQFBqiltsewOZP14uA8z6Odpr4ZkNPQMudWxWlA=; b=HWHVri23lvxhhUOIlY6Pkv6f6yumm85T3iXs8VOeOZktqv6vGJtE3jNuwlTX6bp0zQHBuh TAxdvKd319kJohAw== Received: from director2.suse.de ([192.168.254.72]) by imap3-int with ESMTPSA id M8yBJeWs02B9LgAALh3uQQ (envelope-from ); Wed, 23 Jun 2021 21:51:33 +0000 Subject: Re: [RFC PATCH] gdb/testsuite: fix gdb.base/info-types*.exp when no libc debug info To: Simon Marchi , gdb-patches@sourceware.org, Andrew Burgess References: <20210622172447.1862794-1-simon.marchi@efficios.com> <8de8702a-aefa-4f91-dafb-32e17311159d@suse.de> <547612f8-58ea-56c8-6ae7-c2116581b2f8@efficios.com> From: Tom de Vries Message-ID: <318507f9-6d4e-e166-f64b-0e972fcbc258@suse.de> Date: Wed, 23 Jun 2021 23:51:32 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 In-Reply-To: <547612f8-58ea-56c8-6ae7-c2116581b2f8@efficios.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-5.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jun 2021 21:51:36 -0000 On 6/23/21 5:36 PM, Simon Marchi wrote: >> -# Match output of COMMAND line-by-line, using PATTERNS. >> +# Match output of COMMAND using re. Read output line-by-line. > > re -> RE > >> # Report pass/fail with MESSAGE. >> - >> -proc gdb_test_lines { command message patterns } { >> +# For a command foo with output >> +# (gdb) foo^M >> +# ^M >> +# ^M >> +# (gdb) >> +# the portion matched using re is: >> +# ^M >> +# ^M > > To summarize, the intent is that it works pretty much like gdb_test, but > it consumes the output as it is produced to avoid timing out? > Indeed, the only difference is in scope of match compared to gdb_test: - matching starts at the line after the prompt, so it skips the command - there's no implicit .* before the gdb prompt, so we can use anchor '$' in a meaningful way. Committed. Thanks, - Tom. >> + if { [regexp $re $lines] } { >> + pass $message >> + } else { >> + fail $message >> + } > > That could probably use gdb_assert: > > gdb_assert { [regexp $re $lines] } $message > > But otherwise, LGTM. > > Simon >