From patchwork Mon Mar 4 19:47:06 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 86768 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 454073858289 for ; Mon, 4 Mar 2024 19:47:41 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by sourceware.org (Postfix) with ESMTPS id 90B47385842F for ; Mon, 4 Mar 2024 19:47:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 90B47385842F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 90B47385842F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::436 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709581634; cv=none; b=RAIvMsBkvxti1/U9OC/2pNyCRhg9u5q4n6/7y1zKszMpcrusczjp21CS7CHu/wZcZOOKgZi8V1tIzo6+3TDJEaJ35+iG+Hy4WXLMAbWj7cT0jpHJ82J7DMzyPpBzhuehCl9W3cx3rgHQI9fPFmZNB4l+kvU/uaEmClw4wqAaPBs= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709581634; c=relaxed/simple; bh=0mGXsYhQUvG7M4YuWePyMkqwtQohlt9A/7iYaLY7cw4=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Uu5hnnusRaRS62YZ1t1R1VUokjnH5EtTgqTUoxkwM2YvS/Iuehe4fbu7RNcGCmvwlrlsTHYW08/nTY0wbtfDcBfJgxDd9Saeo6JtqQfntVY6LlVfJsfZqkq+OUNBTBUnsj4xOoNVdeQ7HoRWx0zcmWvy4nmtY5hA9aOrMYV0Goo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x436.google.com with SMTP id d2e1a72fcca58-6e56787e691so4041250b3a.0 for ; Mon, 04 Mar 2024 11:47:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709581631; x=1710186431; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=m1YcJAXnYu/pWe+pX2XhY5Um/12sz/cZnIJTa45eF3w=; b=NSIVXMdtd++4Dg1VEGfccjfDTpkqprV6AhjQg/VtNojqCD1GQskRUvKFaO3zxGGycr TCp8FZs5WB8R9jrSRBQwTNpPIlu3Lll6R4NfrnlZnuHLs6rPgvJ//vltLfJ/pMVpS3Cj qgWX9cUwIkB0n0Is45+5Q6c8DwelhENuR5Jl38oD/Ce5Os4GAW+Lys3qQ5uCFPYA/HIV e9uAbwfj8AY5bEDNxs8E/lPlbhdaswfRWFDdmhyzVHXD8gvkZKOuoDrMihfixFz9EsD4 ibDtp5RyGu2ViSdkddipdMqau0WpSgTsy9+/HkcN9wm+jtZ/nHUbinx88pM2xXi7E6ge dSAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709581631; x=1710186431; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=m1YcJAXnYu/pWe+pX2XhY5Um/12sz/cZnIJTa45eF3w=; b=munX8c5yUA/c77DabQVQ+u52jZCZl3cuOmBTR3QboFb3vzOeZATja09KFj0/CWxBQD KLwKL9x+zDSwATxPukwB0cxQORbj7HPxRxpxkbOhT0PStEXUQ5eWcEAFE5ny8XgX19iU fiM5WXZUFS+4inuaaNaFUp4xZejrTukNc983Pp+wxNf0j+1HnxG0wDF06jl7T5sugFB7 c1IMJ1U6gNjSf+dBwVv13n4bcXLQbVIwnRWthw0a7sVZTxS+zIBwEiLFOd74629z3B0S c5GW5fYGeHI3gko2SGRwiHKJ2PrexZasEt4WFqo7amEo26NnQYg4Pu7KOich57j0qL4j iSyw== X-Gm-Message-State: AOJu0YzYTbJ6ysWRAfJumbXVcAUppkD4XkE1V+tBU4CNgtOs9hobgRDr ICF7felBjfO7sa9pdOMOutNVqc7p5xC7zqkx8QbmY+M4Wx7S16DkjloAzQjfa41j1L2d/C50QS3 O X-Google-Smtp-Source: AGHT+IEyHka6fW/hDA6xJaqDzbHaj7qX+zqtnSGoE7vUa1sBHwUQmA88ENxDyqHQoBFcRtomk4eeng== X-Received: by 2002:a05:6a21:970e:b0:1a1:58b8:59d8 with SMTP id ub14-20020a056a21970e00b001a158b859d8mr276328pzb.1.1709581631533; Mon, 04 Mar 2024 11:47:11 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:3bba:9d48:df05:9a53]) by smtp.gmail.com with ESMTPSA id b22-20020a63cf56000000b005dc884e9f5bsm7951642pgj.38.2024.03.04.11.47.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 11:47:11 -0800 (PST) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH v3 2/2] gdb/testsuite: Clarify -lbl option in gdb_test_multiple Date: Mon, 4 Mar 2024 16:47:06 -0300 Message-ID: <20240304194706.3384389-2-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240304194706.3384389-1-thiago.bauermann@linaro.org> References: <20240304194706.3384389-1-thiago.bauermann@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-11.2 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org I was a bit confused about the -lbl option in gdb_test_multiple, and needed to read its implementation to determine that it would be useful for my needs. Explicitly mention what the option does and why it's useful to hopefully help other developers. --- gdb/testsuite/lib/gdb.exp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index fe4ac7d27190..9a2a64fa9ba1 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -921,7 +921,10 @@ proc fill_in_default_prompt {prompt_regexp with_anchor} { # if one of them matches. If MESSAGE is empty COMMAND will be used. # -prompt PROMPT_REGEXP specifies a regexp matching the expected prompt # after the command output. If empty, defaults to "$gdb_prompt $". -# -lbl specifies that line-by-line matching will be used. +# -lbl specifies that line-by-line matching will be used. This means +# that lines from GDB not matched by any pattern will be consumed from +# the output buffer. This helps avoid buffer overflows and timeouts +# when testing verbose commands. # EXPECT_ARGUMENTS will be fed to expect in addition to the standard # patterns. Pattern elements will be evaluated in the caller's # context; action elements will be executed in the caller's context.