Message ID | 20240301192750.1208030-1-thiago.bauermann@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> 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 1BD843858402 for <patchwork@sourceware.org>; Fri, 1 Mar 2024 19:28:24 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 95C623858C5F for <gdb-patches@sourceware.org>; Fri, 1 Mar 2024 19:27:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 95C623858C5F 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 95C623858C5F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1034 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709321275; cv=none; b=dCWxyXYogQQcRCWvHbIbBTjZbwo+a+SGyf2NKR3OrIA3yx/x2GJX+q8mFF4uLepB8ya/Q71KxixHjs2dqka3XQpDKY8POKgVlwpIQji67LsgaCNVUUPeqaNdEHUr5Qnyi7N8tqmxBw82xLdLaUdVnQeUKLKN9SGR8UxPqv3GPhc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709321275; c=relaxed/simple; bh=qZfN3EPcp0xUqmExsw7EFc3xDzvrv/Q0h4clt3Si8NE=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=AXEWv9c/wAIeRrZVmogOOSJpVoaAQyPvXT5Mu0xVHbefryCIrT8rS8sejfkJ4T4Sa5CXYmTIzqf4DdQ6AXufz2Tpgdd8dI8cxIZMEbO2FBwfO7n91a4hWvQe9H0pWt1H7BAUmOoIP6mu3dtzoTHuI+TsOQqOleOhLLrWx8p1+hQ= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-2997cb49711so1387288a91.3 for <gdb-patches@sourceware.org>; Fri, 01 Mar 2024 11:27:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1709321272; x=1709926072; 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=CQavxEJG2Q80JRQSNGcw0RD478K1UdJB0tBznjLOkOQ=; b=ZlLcrWuEuH8g5VXf00+H4CDjeNcQApXFKa/h/8g6w9I5iQrQzVQhfLErguiu0lHF2S 3gx2kkwPHk0MJUQlParbF7bZ4khtyQsmFOYHOAAlpU32DmVx1aGnXGXPGCUHWFodVb2G oQJNpB5mA6ydsZZq+M9EKmDbdsuSmaOYykcHlkujZy4i6Mo64TvBQwBtgGUXm55MpBcj oCjgVk+NG3vKwwnOYLDhj8ic3slYKuzJW0peN7w8/ycgJpHm9TQLsl8Y4QQq2wrQJIi2 pac/b6f5I6FJTno3DwVyBsqw1X5UjwUURamSY+XT8LCABOOw/orvhoBeV3BEpYWhzhD4 AIHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709321272; x=1709926072; 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=CQavxEJG2Q80JRQSNGcw0RD478K1UdJB0tBznjLOkOQ=; b=YkpSJ/Uv1oJbdPuZ3jJu7r5x/9m6qW08hL0lZiW1fE2BLxldJdbJMzWwlknjH/BjBH BzddHxkKKInOZbKzp4K0FPc+2TW2m1odYzNF6xfjULbAYeTLYat8b9cgZNqBtbL6LEVf LvsUvEobX4WEoF/cPxG0l/jLzdBiD0znufjOLyyqag5L9KUNpsAZsBXBAbG/oFZjJOzD kNijdLtyATdd1lO8QSUzMlwnojrOD6n8Mdq20ODOFO6V3UoMGUDma5PHd2cxhZK9Lbi+ NKkgdm1tygzEwje27u25OB7skLGbesBYv5UZM3DNmXL3Sy/o5MTxQXTb2ECt4WlXz4/S E5EA== X-Gm-Message-State: AOJu0YztHxZJbPavsL8+NiFh8i+VufecnLfl6JeK1a/imo2RoHvPQw5/ msjKHJAW/JTUQmNqRGSXzyfcFOHuPOfZDKqb3ebEo3YejtKQJaz7yo+2DnutKucd0r2c9dhXFKI TkJs= X-Google-Smtp-Source: AGHT+IElJiqLNjP2FU19Qh6l2pORJ4EwDHcP3WI9e2lWlAIlj5bVxT3aLqH/VwAFr/TJpQU80PxsSA== X-Received: by 2002:a17:90a:9a5:b0:299:275d:c346 with SMTP id 34-20020a17090a09a500b00299275dc346mr2701776pjo.5.1709321272561; Fri, 01 Mar 2024 11:27:52 -0800 (PST) Received: from localhost ([2804:14d:7e39:8470:f106:39af:bc7c:a37]) by smtp.gmail.com with ESMTPSA id u8-20020a17090a5e4800b0029a56afe382sm3574364pji.39.2024.03.01.11.27.51 for <gdb-patches@sourceware.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Mar 2024 11:27:52 -0800 (PST) From: Thiago Jung Bauermann <thiago.bauermann@linaro.org> To: gdb-patches@sourceware.org Subject: [PATCH] gdb/testsuite: Increase timeout when using read1 in gdb.base/osabi.exp Date: Fri, 1 Mar 2024 16:27:50 -0300 Message-ID: <20240301192750.1208030-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, 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 <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series |
gdb/testsuite: Increase timeout when using read1 in gdb.base/osabi.exp
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gdb_build--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 | success | Testing passed |
linaro-tcwg-bot/tcwg_gdb_check--master-arm | success | Testing passed |
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 | success | Testing passed |
Commit Message
Thiago Jung Bauermann
March 1, 2024, 7:27 p.m. UTC
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 using a timeout factor to run the test. --- gdb/testsuite/gdb.base/osabi.exp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
Comments
On 3/1/24 14:27, Thiago Jung Bauermann wrote: > 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 using a timeout factor to run the test. > --- > gdb/testsuite/gdb.base/osabi.exp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.base/osabi.exp b/gdb/testsuite/gdb.base/osabi.exp > index 9bbfff52bae8..47d5755f1584 100644 > --- a/gdb/testsuite/gdb.base/osabi.exp > +++ b/gdb/testsuite/gdb.base/osabi.exp > @@ -27,4 +27,6 @@ proc test_set_osabi_none { } { > gdb_test "set osabi none" ".*gdbarch_find_by_info: info.osabi 1 \\(none\\).*" > } > > -test_set_osabi_none > +with_read1_timeout_factor 10 { > + test_set_osabi_none > +} Hi Thiago, If it was really a case of "GDB is thinking for a long time before spewing out an answer", then I think that increasing the timeout would be the right fix (or, make GDB faster). But here, it appears that it's GDB outputting a lot of lines, and dejagnu taking some time to read it. I'm actually surprised that dejagnu times out, since it's constantly reading characters (one at a time), I would think that it would constantly reset its timeout timer. But perhaps the timeout applies to the whole gdb_test command. I don't recall, I haven't touched that in a while. Anyhow, a common way to fix this without bumping the timeout is to change the test to use a line by line approach. Typically by using gdb_test_multiple to consume one line at a time and to keep reading until the prompt is seen. The test can set a flag to indicate whether the searched-for string has been seen, and do a gdb_assert at the end. There might be some smarter ways to do this today, I'm not super up-to-date with the latest testsuite improvements. Simon
Hello Simon, Simon Marchi <simark@simark.ca> writes: > If it was really a case of "GDB is thinking for a long time before > spewing out an answer", then I think that increasing the timeout would > be the right fix (or, make GDB faster). > > But here, it appears that it's GDB outputting a lot of lines, and > dejagnu taking some time to read it. I'm actually surprised that > dejagnu times out, since it's constantly reading characters (one at a > time), I would think that it would constantly reset its timeout timer. > But perhaps the timeout applies to the whole gdb_test command. I don't > recall, I haven't touched that in a while. > > Anyhow, a common way to fix this without bumping the timeout is to > change the test to use a line by line approach. Typically by using > gdb_test_multiple to consume one line at a time and to keep reading > until the prompt is seen. The test can set a flag to indicate whether > the searched-for string has been seen, and do a gdb_assert at the end. > There might be some smarter ways to do this today, I'm not super > up-to-date with the latest testsuite improvements. Makes sense, I'll post a v2 that uses that approach. Thank you for the quick feedback!
diff --git a/gdb/testsuite/gdb.base/osabi.exp b/gdb/testsuite/gdb.base/osabi.exp index 9bbfff52bae8..47d5755f1584 100644 --- a/gdb/testsuite/gdb.base/osabi.exp +++ b/gdb/testsuite/gdb.base/osabi.exp @@ -27,4 +27,6 @@ proc test_set_osabi_none { } { gdb_test "set osabi none" ".*gdbarch_find_by_info: info.osabi 1 \\(none\\).*" } -test_set_osabi_none +with_read1_timeout_factor 10 { + test_set_osabi_none +}