From patchwork Fri Mar 1 22:14:04 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: 777073 Delivered-To: patch@linaro.org Received: by 2002:adf:e94d:0:b0:33d:f458:43ce with SMTP id m13csp1585244wrn; Fri, 1 Mar 2024 14:14:44 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCWonPco7V94MLAVWM3BNiftFk52RCy+UoSIKKzft+9wbHZi4FC0N1H/P8FbkC4ATeUlz0aAgqjArg6+BnBkkqRy X-Google-Smtp-Source: AGHT+IHv0uD6HfkRjtZ53tjBrsLd1Z/nSQA44zI+aec3XqHMBfPpZzeI0PAKs2JOIwP35VFVieTo X-Received: by 2002:ad4:4203:0:b0:690:4e29:4ba7 with SMTP id k3-20020ad44203000000b006904e294ba7mr2946735qvp.59.1709331284009; Fri, 01 Mar 2024 14:14:44 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709331283; cv=pass; d=google.com; s=arc-20160816; b=kWlTLUnNlMfWCioz+ySesQv9shO8Mqdyo8+hwj3RN+UtOCMaUZoulZ7AgpDwTUW3Rl 3KhqrlOLCu7auAryxRdWy+PLifles2JQafytOnl0aM5RTevc/r/Shpcxt2HoWDIWxbgd 86V3bQSNPIwsGMAxV9OZP34OjjN9J475VAAK9V6Y7NpiCDj2fZmwlu+SmHdlUB/C4l6m 9E95erTKbZyujETWtOwPb4P2xq3Ecfq+k17y3fxl8hu3l0ERnrE1RMOUqTAeq8VlIzt+ vQDHGGv2uyHSXDqsUHTNhjVGibv4U5VjUw4iz6AprHInL75OJYjTyjWwtsYPHtvUTSBo C63w== 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=cVOJ5c5HtfOQNDK5fv3H/2aOYGJR2XpumjVuuawy4xc=; fh=t47IDeCIt5LkJz4J2tT5rm77ZiVMdrafditeBtRNkVM=; b=rZgMyP2h4cTYA6TauBbBZKhcjtWG070b+s1YtRifTKOXB0PF7m1cJ5M3cuKMW8mqfD Jz9mEVYjONM6CTVTAmJZHyn8xMEDsLDcKQejDbbuVQX4o447nMpm6DnwzKA76aRWYccR 0yeiqpeVgfoP4sV5PKA1ik/UbzK7aR8qK3w7HHon3vtXKCRD8zjkZmf2n8pUD3i/PGt/ K5/J/enhlgMbG4VQCI1smhnISGHY0lVQgGteK35YxAucslKvL5ZQ938sJ24KujHPQVaT GpV2m5lTXdXTOLi1Yjw7AR/ziUAajKkGLQKmmwQNvXYS5Essg16RknPIrURJPcAZfDLF vF/w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D0fWIm29; 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 pa2-20020a056214480200b0068cbacd748fsi4376381qvb.520.2024.03.01.14.14.43 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 14:14:43 -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=D0fWIm29; 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 A52F43858C32 for ; Fri, 1 Mar 2024 22:14:43 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by sourceware.org (Postfix) with ESMTPS id 451643858D35 for ; Fri, 1 Mar 2024 22:14:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 451643858D35 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 451643858D35 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::42b ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709331252; cv=none; b=YpnZwSt6Pzv0uX7ay2VWaprfM7L4eqzqT9wlOzhxW26ZUV94A4Od3oxV3UprmDDGDXtdAbGs8bqYtO54xwwy4GoONa1vQ4ew66YMQiGnHmGS+J+i2ZOR6jsejc1DFmods7HK9OStctYn5B+QIT8tTJqZuQKzZtsow4RA92jI2ag= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709331252; c=relaxed/simple; bh=Hc5lDZyydmUKrJw0QaoanQekIxwHkqGHR7YqMg/zw2Q=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=d3qQMCqAZYF9LOh6XQbJq9MbDiZWVovSkh7rqL6xX9B/a7mGL6F4zcZXkw9CBDy/ApVVSZlDR2GarzgbvRJgocPk/2U6kaQVahLVwsvdWfauFt928752+Ff7sYLJG4txQ0/ENHe0XaaspWDFoMSjL7x7KYU4GXQh9rS6M7oLzOw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-6e57a3bf411so1628228b3a.0 for ; Fri, 01 Mar 2024 14:14:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709331247; x=1709936047; 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=cVOJ5c5HtfOQNDK5fv3H/2aOYGJR2XpumjVuuawy4xc=; b=D0fWIm29S6thmGWGj1Z36ySTmtRNNXtqDwj3o13rRDZEHoyxkLxkbx+wEgFKKMUAea JluV4Hkwb9hsZbDhzx+PQ6Rai+BsQyT1veDVcnml1411lsLcM7dixlf64VJoq0IGPMor Mw+qLutQD5I/XS4Fx+qmBDlD4+XOw50tGSWoGnwhb7is0hNNs6cXd4Jl4Gr/FLjS3mc7 029zzxMQBmpENm91ryBc2Wckw5kYGq6hv4u337ZKU2RRd1+/3VHrX5UPRg4FXadO2fAq H+O46vrw50zBJzYEwjDXvY+JrepTDh/ZWQekCkNtDxO8GHqC9DhZ6yM+L9scpacbiSCe omKA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709331247; x=1709936047; 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=cVOJ5c5HtfOQNDK5fv3H/2aOYGJR2XpumjVuuawy4xc=; b=p84xIvTb3ajKXWFbVwhUBowpdFfCrGhcWhUa0iU9uFGEcRrM3qp3ieVJJT7xXFbQu2 J7dQXCkgAVCk26mip6WTJrsNl71DKE21Texjh+KHwSxXrU8w+aGt4ZloKCUYVztnbXUz TfoeVd1C/qsdTLQS6qOrpC7KNSiZFmnHhPu1VotqexiHNib7Q0sgMgTB+0ocJeFs6Wol EBumMOCzB96uWcl6k5T2ag3rzDg6d5rFRqWwNOZ711eMY3F6G5kmwo8M94dW6AsexcRc nW39LNn2d7actHOOwAGLP9RdiNio5za01dO3kUgQDp2TrFp66rvkV6aaunIw6FcjcWUY QhVg== X-Gm-Message-State: AOJu0YyQRy62pyf+R4+MaieFxmqe86Y6cUNmLGqz4GYSGx/jowguZOnk qj/7tRdhvjsmfOH5ziU3hyDtyHP0LOyPqJCwu7ddtAptSb7F4Vs/LlARnAGFpOM9sGADNP7tjqc vs90= X-Received: by 2002:a05:6a00:4f94:b0:6e4:ea68:633f with SMTP id ld20-20020a056a004f9400b006e4ea68633fmr3346600pfb.20.1709331247131; Fri, 01 Mar 2024 14:14:07 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:f106:39af:bc7c:a37]) by smtp.gmail.com with ESMTPSA id k19-20020a63ff13000000b005cfb6e7b0c7sm3571970pgi.39.2024.03.01.14.14.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 14:14:06 -0800 (PST) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Cc: Simon Marchi Subject: [PATCH v2] gdb/testsuite: Consume all debug output in gdb.base/osabi.exp Date: Fri, 1 Mar 2024 19:14:04 -0300 Message-ID: <20240301221404.1219182-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.41.0 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 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, v1 attempted to solve this problem by using "with_read1_timeout_factor 10". Following Simon's suggestion, this version keeps DejaGNU busy instead. gdb/testsuite/gdb.base/osabi.exp | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/osabi.exp b/gdb/testsuite/gdb.base/osabi.exp index 9bbfff52bae8..d48925d806b4 100644 --- a/gdb/testsuite/gdb.base/osabi.exp +++ b/gdb/testsuite/gdb.base/osabi.exp @@ -23,8 +23,27 @@ 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. 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 { + -re "\r\ngdbarch_find_by_info: info.osabi 1 \\(none\\)\r\n" { + set saw_info_osabi 1 + exp_continue + } + -re "\r\n\[^\r\n\]+\r\n" { + # Consume all otherwise unmatched lines. + exp_continue + } + -re "$::gdb_prompt \$" { + gdb_assert { $saw_info_osabi } $test + } + } } test_set_osabi_none