Message ID | 20240903114353.9418-1-tdevries@suse.de |
---|---|
State | Committed |
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 F1DF63860C3F for <patchwork@sourceware.org>; Tue, 3 Sep 2024 11:44:15 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by sourceware.org (Postfix) with ESMTPS id DB4E7385DDCA for <gdb-patches@sourceware.org>; Tue, 3 Sep 2024 11:43:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DB4E7385DDCA Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DB4E7385DDCA Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a07:de40:b251:101:10:150:64:1 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725363835; cv=none; b=rT/xOsuCXqiJFIXMN5YMwwxsg6EoZ3XgV3LD5fL1+dvfzu0mACo7xCV53rqynKUBnuKDHBVGD1s8/LEndX6Y9Ps4xT+1nv4aD30lw9vVt1ufLPkiJnxLbrziCRC3KkM2wapJG5U0JWlZG0rG+GAmMcWlpfQu3ZfP0UWfCn40JG8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1725363835; c=relaxed/simple; bh=P/0Pe/ue530MfKFboA+1K3QoWMd0yfG6SVM9qv2QhAg=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=Lhc0Er3LCvTHOj+M5i+Yy5tiI+uBpF/Qo5+vUNSNZyT3T8ui0CTAjAtFTwxowDg9hzZMRXpGiOEQQyjH7oqfbtwHLkzKNRJnvQ+6AR/9Z6jT47gbzui/hfMiwghD2ZBcg0V6PqLBAzliG9Ztrvw++jFEjXF14n99GcU14ikA9zw= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [IPv6:2a07:de40:b281:104:10:150:64:97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id E3379219A8 for <gdb-patches@sourceware.org>; Tue, 3 Sep 2024 11:43:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725363833; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=14XpTFqwKiK13VJmo2mbBMDtWYkORwhi+6S5V/pzOIA=; b=OHquFGwflUVD2Uy+Kj/N4/+tPskGyEN5nbS/QbvpmQ/pFF9cVbfSlyRf+ytMw6XX/Anodv ivn2jLNzucOESLUB3+JUBjb5UDWCSucPmY4hN3zC/rs2s8p2XNqDMvK6FFaYqFRuoyTbr0 +ENdRvOWt3obp903z9FBanKJn8LAppk= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725363833; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=14XpTFqwKiK13VJmo2mbBMDtWYkORwhi+6S5V/pzOIA=; b=t1mDtSvQknGzgFc3bU/L8MduY4VTwTcPcHjNZPOuA3xyDHYOEuy1YjVELtZvClPi2oSrFS xkyCjegzrV/TMMBg== Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=nElM964d; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=z+TAGCuB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1725363832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=14XpTFqwKiK13VJmo2mbBMDtWYkORwhi+6S5V/pzOIA=; b=nElM964dRSFHW3XZEJ43fnXEc1IUOJuGmnYbaKwFU1ph9wqQ4HzLdnbj5y38rY/GqfGWbK ov85wuTY8P6YnrJ1oKa7ZfsoEew29Iw4r4XIfpocwQUzQMFmXrsd0JIqGthq3go11cHWrS NuoUlffe75IiM59IliMO6U/P7lCnv8U= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1725363832; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=14XpTFqwKiK13VJmo2mbBMDtWYkORwhi+6S5V/pzOIA=; b=z+TAGCuBlfMFLYTKdImXKCEy70xPJosSLGcA2XkRCAIVUxLlkb8M7DSTaTM50DA7SKnSSN DS8TIXJ/++TccCDg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id CC30813A52 for <gdb-patches@sourceware.org>; Tue, 3 Sep 2024 11:43:52 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id iCl2MHj21mYXJgAAD6G6ig (envelope-from <tdevries@suse.de>) for <gdb-patches@sourceware.org>; Tue, 03 Sep 2024 11:43:52 +0000 From: Tom de Vries <tdevries@suse.de> To: gdb-patches@sourceware.org Subject: [PATCH] [gdb/testsuite] Fix timeout in gdb.mi/mi-multi-commands.exp Date: Tue, 3 Sep 2024 13:43:53 +0200 Message-Id: <20240903114353.9418-1-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: E3379219A8 X-Spam-Score: -3.01 X-Rspamd-Action: no action X-Spamd-Result: default: False [-3.01 / 50.00]; BAYES_HAM(-3.00)[99.99%]; MID_CONTAINS_FROM(1.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; R_MISSING_CHARSET(0.50)[]; R_DKIM_ALLOW(-0.20)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; RCVD_COUNT_TWO(0.00)[2]; DBL_BLOCKED_OPENRESOLVER(0.00)[imap1.dmz-prg2.suse.org:rdns,imap1.dmz-prg2.suse.org:helo,suse.de:mid,suse.de:dkim]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; FUZZY_BLOCKED(0.00)[rspamd.com]; TO_DN_NONE(0.00)[]; DWL_DNSWL_BLOCKED(0.00)[suse.de:dkim]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[suse.de:+] X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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] Fix timeout in gdb.mi/mi-multi-commands.exp
|
|
Checks
Context | Check | Description |
---|---|---|
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_build--master-arm | success | Build passed |
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 | success | Test passed |
Commit Message
Tom de Vries
Sept. 3, 2024, 11:43 a.m. UTC
On aarch64-linux, with test-case gdb.mi/mi-multi-commands.exp once in a while I run into (edited for readability): ... (gdb) ^M <LOTS-OF-SPACES>-data-evaluate-expression $a^M -data-evaluate-^done,value="\"FIRST COMMAND\""^M expression $b(gdb) ^M ^M ^done,value="\"TEST COMPLETE\""^M (gdb) ^M PASS: $exp: args=: look for first command output, command length 236 FAIL: $exp: args=: look for second command output, command length 236 (timeout) ... This is more likely to trigger when running the test-case using taskset -c <cpu> (where in a big.little setup we pick a little cpu). The setup here is that the test-case issues these two commands at once: ... -data-evaluate-expression $a -data-evaluate-expression $b ... where the length of the first command is artificially increased by prefixing it with spaces, show as <LOTS-OF-SPACES> above. What happens is that gdb, after parsing the first command, executes it. Then the output of the first command intermixes with the echoing of the second command, which produces this line containing the first prompt: ... expression $b(gdb) ^M ... which doesn't match the \r\n prefix of the regexp supposed to consume the first prompt: ... -re "\r\n$mi_gdb_prompt" { ... Fix this by dropping the \r\n prefix. Tested on aarch64-linux. PR testsuite/29781 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29781 --- gdb/testsuite/gdb.mi/mi-multi-commands.exp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) base-commit: a6ecb18b796b2a7342ab72d14c6bd440b718030f
Comments
On 9/3/24 13:43, Tom de Vries wrote: > On aarch64-linux, with test-case gdb.mi/mi-multi-commands.exp once in a while > I run into (edited for readability): > ... > (gdb) ^M > <LOTS-OF-SPACES>-data-evaluate-expression $a^M > -data-evaluate-^done,value="\"FIRST COMMAND\""^M > expression $b(gdb) ^M > ^M > ^done,value="\"TEST COMPLETE\""^M > (gdb) ^M > PASS: $exp: args=: look for first command output, command length 236 > FAIL: $exp: args=: look for second command output, command length 236 (timeout) > ... > > This is more likely to trigger when running the test-case using > taskset -c <cpu> (where in a big.little setup we pick a little cpu). > > The setup here is that the test-case issues these two commands at once: > ... > -data-evaluate-expression $a > -data-evaluate-expression $b > ... > where the length of the first command is artificially increased by prefixing > it with spaces, show as <LOTS-OF-SPACES> above. > > What happens is that gdb, after parsing the first command, executes it. > Then the output of the first command intermixes with the echoing of the second > command, which produces this line containing the first prompt: > ... > expression $b(gdb) ^M > ... > which doesn't match the \r\n prefix of the regexp supposed to consume the > first prompt: > ... > -re "\r\n$mi_gdb_prompt" { > ... > > Fix this by dropping the \r\n prefix. > Pushed. Thanks, - Tom > Tested on aarch64-linux. > > PR testsuite/29781 > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29781 > --- > gdb/testsuite/gdb.mi/mi-multi-commands.exp | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.mi/mi-multi-commands.exp b/gdb/testsuite/gdb.mi/mi-multi-commands.exp > index 3a2e774bddc..028e187366a 100644 > --- a/gdb/testsuite/gdb.mi/mi-multi-commands.exp > +++ b/gdb/testsuite/gdb.mi/mi-multi-commands.exp > @@ -103,7 +103,7 @@ proc run_test { args } { > set seen_first_message true > exp_continue > } > - -re "\r\n$mi_gdb_prompt" { > + -re "$mi_gdb_prompt" { > gdb_assert $seen_first_message $gdb_test_name > } > } > > base-commit: a6ecb18b796b2a7342ab72d14c6bd440b718030f
diff --git a/gdb/testsuite/gdb.mi/mi-multi-commands.exp b/gdb/testsuite/gdb.mi/mi-multi-commands.exp index 3a2e774bddc..028e187366a 100644 --- a/gdb/testsuite/gdb.mi/mi-multi-commands.exp +++ b/gdb/testsuite/gdb.mi/mi-multi-commands.exp @@ -103,7 +103,7 @@ proc run_test { args } { set seen_first_message true exp_continue } - -re "\r\n$mi_gdb_prompt" { + -re "$mi_gdb_prompt" { gdb_assert $seen_first_message $gdb_test_name } }