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: 86675 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 DEB903858414 for ; Fri, 1 Mar 2024 22:14:47 +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-Google-Smtp-Source: AGHT+IE5Uczl9bOFsanU/ONW2QB5rpkVNoh3+faMZE8wI6wv/jf/N+49BWeVfpW0QNf4HWcvmkFSAg== 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+patchwork=sourceware.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