From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR04-DB3-obe.outbound.protection.outlook.com (mail-db3eur04olkn2024.outbound.protection.outlook.com [40.92.74.24]) by sourceware.org (Postfix) with ESMTPS id 9768E3858D35 for ; Mon, 22 Apr 2024 09:53:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9768E3858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=hotmail.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 9768E3858D35 Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=40.92.74.24 ARC-Seal: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713779622; cv=pass; b=SnKyrxGAjPh8iFT5pYmSoby6J3XIXKH9Oe/w+Q9vYjCq4kqAhWJ6yEDPbtsQKIPmQbtIfyVHNUSEZ4u9HrQJmLetl5cxo6a7BZzVov1sJ1I0hrN8fvhftI4Uv+iTUrz2vVdGtctikNVd91qlIdT9Q1ek7BOKcAizs34GKm/LMs4= ARC-Message-Signature: i=2; a=rsa-sha256; d=sourceware.org; s=key; t=1713779622; c=relaxed/simple; bh=Nj8fvd9ztW53mf2924WWo+3siSIslZ6QVwzc3CWURHg=; h=DKIM-Signature:Message-ID:Date:From:Subject:To:MIME-Version; b=HOSB6xj2MfAiLEDcztNF7ARVAFd6yKCeLpcbc5kd7HqCuxYA520ulZLhmHcmfqGN7+GxRq6GX3n78+IkeIRB8dBnhzDSfGVV6AIt6HK8FYA/TPQCwVjGedXtnKxzlTxo9YIXtYOnmjBJW83kjXYbqm93HYAx3HErx+xACXcGukQ= ARC-Authentication-Results: i=2; server2.sourceware.org ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YK6+XA5vepFmuummp/60kSEW2XoFQWsNW6loIs1NGyXuPWiAoO+ELsiYaZBa6Xr79M0M908Dmfv4FYO292EK+UA+8V7QiM76cBStXLtrKSNGzHtVwuqN8fjNL40H4FdEDW0roXQBtH+LzgLpNqYKG57YYYILInOVht9vQa6BMK58CSgXezu15e2pShLGNsTqQFrFp6nT8tXItRsEIisxk/Lrt+y2xUBF/REVwSk1vE+ftYNlml4R7l+G5e6V15J9SUP4a44mwGUeb7jzrOJkLViun6fw/xPNqcgUot3q0u6xpWIgchrvMIt2JWYRIPyuZkyymN4OeLhSfQ8jf8SkAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=spXSfZCKr9y4NPq3j/TK9cJ/VrOAloiLyX9v2uqSo5E=; b=hFFhfoVb2cRqGmwlrN8ElqDsjbLDpw9AMdKYXg2A1MXHQyCnpEX59RnQLxDYmrea21tsM4GFBqdZ1kjg/9dogvthqPO4Yjlw8w4dyj8ooFCAxuviQZJytPV5hj9+Avpm9uxQH/tW8iji43tDkSPHTv/q33QgCGh9MDq6AvUH4W6CfbyK+i1sHyi5K3qwpM055eEKPitjfhyQK6wbW/hzYR0NragmhY0SBjN766yMms3A5RAdR6bsM/XfWiIZwm4rHYuEzoFU9R0kBdbAahTekQaNzteP5hSm9ILLoZ4sIXihmGv9t54FAHRzlTeBmniCQ56E2qXzHgAN0cNMze9/pw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=HOTMAIL.DE; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=spXSfZCKr9y4NPq3j/TK9cJ/VrOAloiLyX9v2uqSo5E=; b=KPU3F07baeGxCaAMhHuZ6uxc+z1eRZZhE9Lky7YikW9ymkcGH/Iuf8bafb9gnLXMKhqQb8TvgiaZSUjlhbdQ/xECnm0o1NP5eKAn+AZdZMrWH5Yj4t4vugSg8lizxh88HGSkuXO7jAHZbJMt1s1qx06wgb9hFOsXPcxlKnMne6e6wXtNSxYu22wyxt7LUG4pr/sty6rlEbEgOGwdKta0xJ7MrYOTbZXGA7wAheZlDl9/Uo5qyg2N1idEkNQcJMQHvwCL8fTMI71v2TOE1+anDVMNSd8s4UKEoARxeMCXOI2FpV/pXJ+egpPGTG4JsVVD/cY4Bo0yCxe3oNf/zV/WTw== Received: from AS8P193MB1285.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:333::21) by DB8P193MB0567.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:145::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7472.44; Mon, 22 Apr 2024 09:53:38 +0000 Received: from AS8P193MB1285.EURP193.PROD.OUTLOOK.COM ([fe80::5403:f1ad:efaf:1f71]) by AS8P193MB1285.EURP193.PROD.OUTLOOK.COM ([fe80::5403:f1ad:efaf:1f71%4]) with mapi id 15.20.7472.044; Mon, 22 Apr 2024 09:53:38 +0000 Message-ID: Date: Mon, 22 Apr 2024 11:55:34 +0200 User-Agent: Mozilla Thunderbird Content-Language: en-US From: Bernd Edlinger Subject: [PATCH v2] Fix random dejagnu test abort with simulator target To: "gdb-patches@sourceware.org" , Tom de Vries Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-TMN: [QtX2oPMoeEo5HgssIqUnuwRN+DbhqNcsErtkmSN3gAefd6a6ZYjJIwlgAYtxfSG0] X-ClientProxiedBy: FR4P281CA0369.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f8::9) To AS8P193MB1285.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:333::21) X-Microsoft-Original-Message-ID: <8e953fb0-e7f7-4047-96f3-979a8cc4b7e6@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P193MB1285:EE_|DB8P193MB0567:EE_ X-MS-Office365-Filtering-Correlation-Id: 8bc3d64d-47f8-4dd6-0a99-08dc62b21564 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tf8nYyp/j2lf9B7V3ygu/Q7V0ZnVErGFzN7z+EfYnTDF3HM6yVKe2rH0gu19JKKZb/tNAJ2ydtfuYt4zpQWI3Md3ICk7MA95qkYXPb0KdWHPPIm8BbLhh0UQMIyDkuyuEVIIXB+25tNXawdo/8VkEbSDfR4EKLy5lUoah23bzE7J/7SbwcdJZu9cfSQ167Bwke9tFzh2EbaUeelDTps5dx0tCBU5BtgTUFNwYKoQTidedChOk9L/CpkSUHlngktJY7SIen/969/STvlnTXhHe6ys042MyULE3oXzJCUpLuDZwkWF89mYF9+YqFsyIrh24MIFdoVu6usSA3ze5TkSa+ezckkzmitOUpZG57y80nz+HQpFqeQF60HCi9gafoq3n134sMWiQwpRab7VkIGxxiTzfiIvA/7Tx0v28TsLFnIj3PwA6cUTqDyEza7UsV0ohOae0TKpByaGbBKnttEleiWaubY07rLPcpTnvXAFQa/GRNIUQZbLrQmuRNgOEo/2XVwOIzHsR59wtUf/qJemEkZutfIu2DJYfHyd6HkYw6W5v/F8NSDMYgks+OZK8OeRc0I6wwB7mlZdwKDvWC+Jmqqfq8HR4tDZXp1JKfBX2cjPkziu/QZWooztjBwtM2WZCdMuljaf/SlOVV6VnN0LXJtdk5FssO3rPAoOtOEBdvU= X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?eWNCbVFnNGk5Y1ozM1QrdmFrY1J1a2ZvOW05bHFVY1VSampQVW02akdCQ1NE?= =?utf-8?B?cFVONzdERnc0MEh2aGNFSlR3MFM3K1ZCQnRYS2p6Z2pzSmhpMnMrSDhybFhj?= =?utf-8?B?SW5HcXc3Z0JlU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eC9UNUN3dkh2K1NCdHFGblZyTnc3eG9GZWpOTXJyWHlaKzl6OGR5QzRL?= =?utf-8?B?SUVaR3FYZUFQNVd1OUZlQkd3OVBVYUNVc2cweGV3L0tWczBtZDlZb2Y2QTVT?= =?utf-8?B?L0VqWDNtWTVucU9YaVR0TW16L1U2anMyVlNhaTZEc2Qyc3RKSDRRbGVUeHI5?= =?utf-8?B?VjcvdXpEV2dzSXBHRDlXV1lxWjBPRno0SVhZdG1SUWRMZ0QzOXl5ZVNFOTdO?= =?utf-8?B?R2lWd2xvMUF4VkxINzlCajBWVUU1MmUyNWZrTjBJa2gxWnRuREVTdHVEWmNw?= =?utf-8?B?dlBpUERGQmdLZm4vSGhwT1JhcEtULzFzK2ExaDltdkVLLytMaXlzKzByOHpH?= =?utf-8?B?K2tML1d6WUE4TmFDLzh3SFlzSFhtV0JLcmpiT3p6ZlFNY2RSZVBHTjNqZ0h0?= =?utf-8?B?OGFUZ3luUkptSDZmT3dBdkFQdjMwVEptTHJlNklucmhWcytWeWsrZE5Oa05D?= =?utf-8?B?S0FSZDVhS0dHMi9xTjdQRTcvaCtQT1hMendoeUZ2SS9QUjJPUWo5SENxUEpR?= =?utf-8?B?Si8vcGQwMmNweDNGSm9td0RRWGgzL01lQ1ZpbGE0OGJDR0lxTVVBSjcyTTh5?= =?utf-8?B?SUVEWkUzL2w4U0lKeW9NRXJZTnBTNEJpMll2WExDQndvc0VtSXZzSG9hUVEv?= =?utf-8?B?U0Q2dVRFenRVWmluaXVmUUc1RThmcmFtd0NidVBBU0xMbGJwTXE4Ly9YbmdL?= =?utf-8?Q?QWqZrUuW6B/MIT+NZKWhtdc3g0JXhR1xsf0/v50?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-80ceb.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 8bc3d64d-47f8-4dd6-0a99-08dc62b21564 X-MS-Exchange-CrossTenant-AuthSource: AS8P193MB1285.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2024 09:53:38.5227 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8P193MB0567 X-Spam-Status: No, score=-13.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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: This is probably a dejagnu issue with the gdb testsuite when a simulator target is used. I observed random testrun aborts with dejagnu 1.6.2-1 from ubuntu 20.04 The problem starts when the test case gdb.base/sigwinch-notty.exp tries to execute "sleep", although that is impossible with a simulator. And for unknown reason the test case completes (with errors) before the "after 1000" block is run. Then in a totally different test this happens with 50% likelihood: ERROR: (DejaGnu) proc "bgerror {can't read "gdb_pid": no such variable}" does not exist. The error code is TCL LOOKUP COMMAND bgerror The info on the error is: invalid command name "bgerror" while executing "::tcl_unknown bgerror {can't read "gdb_pid": no such variable}" ("uplevel" body line 1) invoked from within "uplevel 1 ::tcl_unknown $args" === gdb Summary === # of expected passes 30815 # of unexpected failures 241 # of expected failures 3 # of known failures 23 # of unresolved testcases 241 # of untested testcases 96 # of unsupported tests 532 # of paths in test names 1 So the whole test run is aborted in the middle. This patch should fix the issue. Co-Authored-By: Tom de Vries --- gdb/testsuite/gdb.base/sigwinch-notty.exp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) v2: I took over Tom's suggestion 1:1, and gave it a few test runs with no unexpected test aborts so far. So this looks quite good to me, and has also a nice improvement of giving an UNSUPPORTED message, with what exactly was the reason why the test did not run. diff --git a/gdb/testsuite/gdb.base/sigwinch-notty.exp b/gdb/testsuite/gdb.base/sigwinch-notty.exp index cef21c07c59..621231df6af 100644 --- a/gdb/testsuite/gdb.base/sigwinch-notty.exp +++ b/gdb/testsuite/gdb.base/sigwinch-notty.exp @@ -19,11 +19,17 @@ require {!target_info exists gdb,nosignals} -# The testfile relies on "run" from the command line, so only works -# with "target native". -if { [target_info gdb_protocol] != "" } { - return -} +# The test-case relies on "run" from the command line, so it only works +# with "target native", so we need host == target. +# +# The test-case uses "exp_pid -i $gdb_spawn_id" which doesn't work with +# remote host, so we need build == host. +# +# In other words, we need build == host == target. +require {!is_remote host} {!is_remote target} + +# Check that we have "target native" as opposed to native-gdbserver etc. +require {string equal [target_info gdb_protocol] ""} gdb_exit -- 2.39.2