From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by sourceware.org (Postfix) with ESMTPS id 0C2323858D34 for ; Sat, 20 Apr 2024 16:59:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0C2323858D34 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 0C2323858D34 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::632 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713632352; cv=none; b=q/N8UIuw5r8ZFiPfa34KdemJ88z8VA+VAfYDfjpcrNjLqO8UZYF5qa1UoG/kAhRjqXZuK7F09WNTj4FQnmJkAzPtTyFmHrurEQwaovSxLuaQCYf5+OjvTaPecl2rJNQd7/UlVkDB68IqpDT+FYFkBmhwqe6X3S/MB/dnYg0krpo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1713632352; c=relaxed/simple; bh=xrM14C+YgyxnjLLLoMNonO1I5dwM9TEo67DnZK7Nw0Q=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=iVtTxL8WyIpVVCX8dDXqkgGYvQW5rlP7F7/javdmfEGc+F6OGAcqWmSJaIecxe28ZC0I1aQ4JN2AZ9hQL5G/MHoC6T31iIbmw1gtRQlRKN1H/ReBMTJRldNNDcIe16b9qa/H7lsJGVbMgJKBe9deJ2i9Vkm7iXoBsAGSBgd9/h8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1e40042c13eso24111065ad.2 for ; Sat, 20 Apr 2024 09:59:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1713632349; x=1714237149; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:from:to:cc:subject:date:message-id:reply-to; bh=i9jZJOO1AjEjqj6W2skIUTNyqZxaIFAcpNM+I8Q3DUg=; b=UPQCijfRn5kha7Tgm9NldKXNHAJ+VE17Oy551XIiF4G+CGTQrzmFP1VZXL/EWelQUc gx3CvRBjTSD8Pb0IKjGXpAnOzsRLweprlKGeuMFPUYTgBYEfXMslaw65WyA9elU+zOG7 BJk+gC0jvNcnT/2qAXEzt1PsMcvG0Vxx1yyGNKMRUniNnS0n5WtKsWD1YHl+NEuWpS/r xm61irdfhCkX8h0YyLEQ+Tpa/rivDk+Hh3fQ9mIIPcGoggeDlINrRBXquAmz59ny1Pp1 lJEhR1l2pEUcFBEmIvyE8dbELoEXXVG9gEwX42OgP4I5ud9Jm1CSS3G+JWpGMxyFvWEQ RYIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713632349; x=1714237149; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=i9jZJOO1AjEjqj6W2skIUTNyqZxaIFAcpNM+I8Q3DUg=; b=MJTjnxy8i1Ol+Phm+qviJD+xe0c+Ko0+GAUO+soG/cOofBtLhujR2Jp5j25J2Lkkp5 w8N9E74z6BmGpfkUZv9CTBSTze+8YyNWOHOrKHurQESaDBOcdpBiMrz1Pvw7u4uMeLGo c7gMZDnmkjzC+5Wlsgd+bgY+bQ2vquLOl2w/Ell+DK2VMCuFGdwFIaJIku/wlA1BvFXn fVgU1Hwif8gIX7d+vQdECzTtAStPAtsRqbW7w7meuQRtH6RRf3XZWXeeu+j1swYHCJIW 62TGHqjGwxK8GL7ShXIz6gvAds5bIsPpViA1CFQqIYnbJ89wDwZnCvbPcOzeVBX2SSCN CMzw== X-Gm-Message-State: AOJu0YysDvnbQCuLnXJ1f9wx8RnKzptrBoe8cpHq7ujFo6SwYd32uUgt d4LPQed1uN5I4+L/T/Ffb03e+/0i3icc+5n0YOZDRslVXs6lQfqMab2Hu/6gMTOfJALskpI+aPU y X-Google-Smtp-Source: AGHT+IFXkcxvZlZkrwdna4AnmpcXOsSAVrScIug8R9mhQskuG77WbkBghfEWK/JvwdmbkG/8i8Thvw== X-Received: by 2002:a17:903:428f:b0:1e4:8eb3:26f5 with SMTP id ju15-20020a170903428f00b001e48eb326f5mr5061574plb.38.1713632348776; Sat, 20 Apr 2024 09:59:08 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:3bb7:c4a7:c946:d2b6]) by smtp.gmail.com with ESMTPSA id f12-20020a170902ce8c00b001e1071cf0bbsm5258128plg.302.2024.04.20.09.59.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 20 Apr 2024 09:59:08 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH] gdb/testsuite: Use default gdb_expect timeout in runto Date: Sat, 20 Apr 2024 13:59:03 -0300 Message-ID: <20240420165903.930352-1-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.6 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 autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: runto uses a hard-coded timeout of 30s in its invocation of gdb_expect. This is normally fine, but for very a slow system (e.g., an emulator) it may not be enough time for GDB to reach the intended breakpoint. gdb_expect can obtain a timeout value from user-configurable variables when it's not given one explicitly, so use that mechanism instead since the user will have already adjusted the timeout variable to account for the slow system. --- Hello, When running testcases on a slow emulator, they failed while GDB was starting up the inferior. This patch fixes the problem. gdb/testsuite/lib/gdb.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index ddee928d5104..cbd37fd30947 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -768,7 +768,7 @@ proc runto { linespec args } { # the "at foo.c:36" output we get with -g. # the "in func" output we get without -g. - gdb_expect 30 { + gdb_expect { -re "(?:Break|Temporary break).* at .*:$decimal.*$gdb_prompt $" { if { $print_pass } { pass $test_name