From patchwork Mon Mar 4 19:47:05 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: 777789 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c8:0:b0:33e:474f:8c56 with SMTP id p8csp106206wrs; Mon, 4 Mar 2024 11:47:15 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWwy1bb//efNktZ7eUqIm1N9fARvgM3lov6mN1Bu0V6j0Wxb95B13HlUuwkSkNWW1xAS9cAqz7IckNRP/JgDC6A X-Google-Smtp-Source: AGHT+IExWUvGFIiAFciQ66dI7bqb1Zpf5VjXhmzntWtrpi5myNxD2/pW77f/qafIRQlYSSuk9w9U X-Received: by 2002:a05:6870:a2d0:b0:21f:abc8:d210 with SMTP id w16-20020a056870a2d000b0021fabc8d210mr9966410oak.8.1709581634756; Mon, 04 Mar 2024 11:47:14 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709581634; cv=pass; d=google.com; s=arc-20160816; b=lZInAlaN9zuoA+Eqlk0UexxuakPRJDKUWGvKEsyzkk0vbiLh/V61D2F+tBi70vf9iv RQb+Sl9pC9UPjcxFviQkrLEHnm8Z05NvV7fSY+Rz4QXYfETS2irSw7XYngkd1SS1dv2h ZRVBnsaNoxTzHHhPZuyQVlJ+ehocbe0387Qugtc1B1qo+gPujLLSoXxUBCrdn77k/+lE +GBFD9Z8I5fZfdTtV/V/RHXL0S11NJDxiyvYnu+enbvqBif2L+p9KDcy5SJyRH/VA7As qWFHNFCLi/B1Mz9RYbWC0Cl1I7j1fIvxV/hZjYjL6u1HVAGbrxmmIzM3EShREl/rub1r mJYA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from:dkim-signature :arc-filter:dmarc-filter:delivered-to; bh=volKaCyf3CpOmA2QcobnqzgN/JcHMSqQjTzlPclK60k=; fh=t47IDeCIt5LkJz4J2tT5rm77ZiVMdrafditeBtRNkVM=; b=cfJCdplNOFlgdabNuXF0Fp/rrfeA+2+9W53CbGIWgODFHbA8aK85nsgDuxjwhFKWxL x5v5eOOt4SQIQ2ZaCH4icU1yFm16ueob79u0YqXKgGrlLYVX7lzyK8rGh7ms6pfkuuZ3 K3/AzjWaSb0jNWPdWfaa1BOYXC2vaVYKN7hclU0SdPXrHsAQK7PVN/Kg+XOgFqP/5cLy j30hu062HrfkLgWOEove1XrPHfIgfeU8yBX75lXt3gLDTLssYu2T7py+LG9kt64m0/0d 0Md5zK+eFO+UISCcMOVe5NAyriWYJBV8jxt3+ZQGX8+E6tKFist95CJirPXrOBwkJjUF RfIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ViY9E6xU; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id z21-20020a05620a101500b007881024a377si6950656qkj.413.2024.03.04.11.47.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 11:47:14 -0800 (PST) Received-SPF: pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ViY9E6xU; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63D6C3858435 for ; Mon, 4 Mar 2024 19:47:14 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-pf1-x42c.google.com (mail-pf1-x42c.google.com [IPv6:2607:f8b0:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 9C30D3858C55 for ; Mon, 4 Mar 2024 19:47:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C30D3858C55 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 9C30D3858C55 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709581632; cv=none; b=UGa2CwD8/gCYKqbJY/EFMbHI9otlRNslvhlfA4aFee+15rot7wIJqkxxFx/7jTZcj5tOzqI5TB0L4E/ds2oT0tTsRupUxsOEK8bAIAzNpROSTVpV9KlWmrx1J3LifzuEQ0IghE4PjXJ16mkRguFZKUkBTfr3ddUrPhLJM8IjX8w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709581632; c=relaxed/simple; bh=J8dGwl3tSob5XGxPlkSvBA+BpTb0gm1AWHxR9uvyxEM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=ZF+cVpfNSTbfnAnS3y/ByP5x9FbyOn3t7+6svVYaQosrmCAPGij19ntnWhNWfZfgyavi35VX/B2tnkZi5JQWlU3aPjAx+O3taUPwkIJkT60kAGT4J0FvgzkXJeqW74+InUw/93WkaP7AlLQaqidWvbLZ8vMvkUV+Nbey/SPqLT0= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42c.google.com with SMTP id d2e1a72fcca58-6da9c834646so4415259b3a.3 for ; Mon, 04 Mar 2024 11:47:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709581628; x=1710186428; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=volKaCyf3CpOmA2QcobnqzgN/JcHMSqQjTzlPclK60k=; b=ViY9E6xUqZykVNs7reupoSX0L2Z19hRViA8vILkD3ShIcaG0vbmo09jPz3x+Sjhzzy XkAgRccAt1u/AcTMMRpkOIkoZG4DxACFChA4f8kJuFrbfOYpb6fygxW92h9eKQp+bdqk xRc9+Il7+yPdb3zjeTOwR/6dxtw8ubHE7mZqat5+QDuZ8IQA/pXaUpxhR0ZlS69cGigZ /LVX8V550awGmN0JsZCdgF9GIvBSzRa3aDaLOiMcLqUmAW3XKjajX2wySnYx0Cm6DX0j ZJjw1RSSI15Yx36AM+Jr1OTxkue1d7Z52xzlxdsmDttXoHJn3xE0Beohmp1RMKhesGUC BM9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709581628; x=1710186428; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=volKaCyf3CpOmA2QcobnqzgN/JcHMSqQjTzlPclK60k=; b=qBds8j4czvaRWg+ucGo7hG5ZLDOiH925NBG8ZCOdFU+qjqa4bt3RvANSDdECSu144z I5Ag3NhiW/odYLpfrQAfLvoXqYYZ4Qf3hV/bdBPwvEjbkfTKrsW76EtyKZPKHq0EIiDL Ci6RCk4h/6jYNGNKscrq5yJnQQMrj3Vs5UdmQzGKpEjEO06cxkYK0Szn0xqNzqyTyA3W pFsO5tw++DZTotOqiy8YhHuUbmXT/s5uB5YU2LtwWigGvy8KNgKOz2zjeP079QwKaoSW 7Fc7I+nUPtJa9eI69x4t3omKP4B4oUBWQRh4ZBHlvYn2m2hPQvjjdG6ZnENKwa0TmIdW s0EQ== X-Gm-Message-State: AOJu0Yx0oPQsLLA8AP2QTTU9br1Q7quu/Mx9AjoZOoW6RpMLl4uNqr7g kN6eAXNZCOSw1ff9UltoR4HOu3uGX80Vs1gCgSl/+3Glz2R8T8X3ZRBUW2FG7ac2X8//cKicMjT W X-Received: by 2002:a05:6a20:12c2:b0:1a0:e707:8c2 with SMTP id v2-20020a056a2012c200b001a0e70708c2mr14096681pzg.29.1709581628548; Mon, 04 Mar 2024 11:47:08 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:3bba:9d48:df05:9a53]) by smtp.gmail.com with ESMTPSA id u15-20020a62d44f000000b006e554afa254sm7976385pfl.38.2024.03.04.11.47.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 11:47:08 -0800 (PST) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v3 1/2] gdb/testsuite: Consume all debug output in gdb.base/osabi.exp Date: Mon, 4 Mar 2024 16:47:05 -0300 Message-ID: <20240304194706.3384389-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 X-Spam-Status: No, score=-10.9 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+patch=linaro.org@sourceware.org The Linaro CI runs the GDB testsuite using the read1 tool, which significantly increases the time it takes DejaGNU to read inferior output. On top of that sometimes the test machine has higher than normal load, which causes tests to run even slower. Because the gdb.base/osabi.exp enables "debug arch" output, which is somewhat verbose, it sometimes fails when running in the Linaro CI environment. Fix this problem by consuming each line of output from GDB, which causes DejaGNU to reset the timeout after each match (IIUC). Suggested-by: Simon Marchi --- Hello, This version uses the -lbl option to consume the non-interesting lines from the output, instead of rolling my own regexp. The difference in the regexp from -lbl is that it uses a lookahead pattern for the last \r\n in the line so it doesn't consume it. This version also fixes a problem pointed out by Simon: > Ok, one interrogation I had while reading your patch was the fact that > the two patterns above begin and end with \r\n. I don't see how that > can possibly work, since that would consume two \r\n between each line. > I would expect to see only \r\n at the end of each pattern. I noticed that the general pattern in the testsuite is to consume the \r\n at the beginning of the line, so that is what this patch does. I use a lookahead pattern for the \r\n at the end so that it isn't consumed. gdb/testsuite/gdb.base/osabi.exp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) base-commit: 1485a3fb63619cced99dd7a4a043cf01a0f423d9 diff --git a/gdb/testsuite/gdb.base/osabi.exp b/gdb/testsuite/gdb.base/osabi.exp index 9bbfff52bae8..97060a33e06a 100644 --- a/gdb/testsuite/gdb.base/osabi.exp +++ b/gdb/testsuite/gdb.base/osabi.exp @@ -23,8 +23,24 @@ require !gdb_debug_enabled proc test_set_osabi_none { } { clean_restart + # Because the test enables debug output, which is somewhat verbose, if we + # look just for the specific line we want to see may timeout before GDB + # prints the next prompt when running in very slow or overloaded machines + # (especially when the read1 tool is used). We need to consume all the + # debug output to avoid triggering the timeout, so use line-by-line + # matching. gdb_test_no_output "set debug arch 1" - gdb_test "set osabi none" ".*gdbarch_find_by_info: info.osabi 1 \\(none\\).*" + set saw_info_osabi 0 + set test "set osabi none" + gdb_test_multiple $test $test -lbl { + -re "\r\ngdbarch_find_by_info: info.osabi 1 \\(none\\)(?=\r\n)" { + set saw_info_osabi 1 + exp_continue + } + -re "$::gdb_prompt \$" { + gdb_assert { $saw_info_osabi } $test + } + } } test_set_osabi_none 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: 777790 Delivered-To: patch@linaro.org Received: by 2002:a5d:48c8:0:b0:33e:474f:8c56 with SMTP id p8csp106324wrs; Mon, 4 Mar 2024 11:47:35 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVXwKheXT2iUdBLYFjbKtcnhLzbAzEQYnqlo5IFwTNvVwj8KXVH+fQrfzMjEbFQfnSSS9abxvo7nXJMQIwsfuy7 X-Google-Smtp-Source: AGHT+IFhhwSQKRPlBKEYqI134kaOn+cpTcIBi0sFBSLQzoXo5ZW5m+tktej0uspuufJ1EIq+gq35 X-Received: by 2002:ac8:58ca:0:b0:42e:ec1a:1607 with SMTP id u10-20020ac858ca000000b0042eec1a1607mr674729qta.30.1709581655582; Mon, 04 Mar 2024 11:47:35 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709581655; cv=pass; d=google.com; s=arc-20160816; b=m3++oKZDHVbz4n4vG0W4PIqYUb189M2ONTe09vwGpy6mNRWE47jaDxdqSwwIwrZHOU e04VgViB4kcPatisQhHPqL2KHISrEZwVHne53is23WkFFDs1qVzFuJzb5Yvj6QltMT7t xgb6oOhqHXblDcjPGmJXQFoRpXcHV/RXX6CX5Md0vDKReOxk6AKNFULLr+41p99bfz3l rlHQLg9H3h6mxOe1NkJkx+bjBd4J3QCDOmLRbUGPHU9jYKi2VSezfP83YBuN+aaNPFYA XI2f9odIlhBionOgh3OwObgirlHc4TWOKjkJvNwY/gZT/LcYiQCAj7qzCYalL/PenPkb zuyg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:arc-filter:dmarc-filter:delivered-to; bh=m1YcJAXnYu/pWe+pX2XhY5Um/12sz/cZnIJTa45eF3w=; fh=72kqq0iQhigvR9Vv/oqX5ebs3Yyyw7XhzWxOOEPdupI=; b=QbFSGLN2jizrLxRhhDOzo+jMaz/JOTmH/PQp5Yn07+wCcgUsL6dxt4DotWGxpWNJ47 FHm6n+EnKWmj8kJkh51Ke1/mB+fck50h+1HO5p7CGPMP4FL/nn7+fdHZZhfDRmB7X5wF r8/WKQVin6l7pCUWZajnOe715/E9i2LYMdcCsoDDP9ohSn/RG2snrXpbZDB7D0LuYLV1 K8bQbAF5kXG07O+9m5eqxETptSAdqgvdHeuGxkQ//SHy+irl1P6/r1jyNlUb+mJQcncn aVHqWB2Nrqei+56NBms7hc96eA2WZzqIHu+NqgdxK/5kDV6bmzirQ0wcNrFB/U5HN1Ns lXDQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NSIVXMdt; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from server2.sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id k15-20020ad45bef000000b00690099c0edasi10343201qvc.474.2024.03.04.11.47.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Mar 2024 11:47:35 -0800 (PST) Received-SPF: pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NSIVXMdt; arc=pass (i=1); spf=pass (google.com: domain of gdb-patches-bounces+patch=linaro.org@sourceware.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gdb-patches-bounces+patch=linaro.org@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 365E3385842A for ; Mon, 4 Mar 2024 19:47:35 +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-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+patch=linaro.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.