From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by sourceware.org (Postfix) with ESMTPS id 3C5273858C5E for ; Wed, 5 Jul 2023 11:23:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C5273858C5E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688556191; x=1720092191; h=from:to:subject:date:message-id:references:in-reply-to: mime-version:content-transfer-encoding; bh=2Fyd1TT/iLjch7CbO30s22BC0d9IGEcDM/sG+5ZcbO8=; b=KBNsb+2xHx2kthYmm56sa3YirDLNC3Px1aV/eOJHEoYSoslXNNCBuXzG /IAen7sxBx4nbX8zUDALrLONpGJdHDiBe932oKEWaIXorc6U4jTMsJqzQ YNQorEoUprBecZ1spmokOJV1+MJtpJ2hRiubY5E/zqzvAk8GPmM6EviOA coNWwQarkxQP5mrXMNXnU7O28nAurPiMnBZpQTya4GdNwJ9UXcYtqpM+9 XbUG5NEF+IDb4DDdivr7up4hHyPnpJO5YllIksI0ticoe3mF3A3Awxtgy jZTZnM3xsinepLz3SYzeX7fUkw1RuEH0qCj49guABWOJFB4w2TDbfT68V g==; X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="426999386" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="426999386" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jul 2023 04:23:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10761"; a="722360823" X-IronPort-AV: E=Sophos;i="6.01,182,1684825200"; d="scan'208";a="722360823" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by fmsmga007.fm.intel.com with ESMTP; 05 Jul 2023 04:23:03 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 5 Jul 2023 04:22:59 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27 via Frontend Transport; Wed, 5 Jul 2023 04:22:59 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.47) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.27; Wed, 5 Jul 2023 04:22:58 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W1fKSpIWi24iOO46jo5k/oz9y85dZTdVZThL+iFtaxt6HhTcPi+uMg9LdTo1O0fo+Egp7VEN5JuvSlJBTMzjAmNA9/LZzmZpS1Snmtn4PbFvTYDd0bBoP9Ic/ZJPYIVNXmb1TmNb7zaKG9oTHvEsoK4hDj9/sWckNY2ENYNrlADMqj6FGGyrnP2Krqq1dMnH3GR0ETW1QxdWbLag9W1c7ZVYzO5Mih8L/7NrYBXWkgthbmV9FM5pMto6AOKJc49zt7e7FRhdx22elQybYF46pHDQgGInZMdsqIF3PwnDBzfo5dDw93+jTALcYIfenZra3r/dNixo7q+wXBcIvRilmQ== 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=Kicv0Rjrkfk6U1U8fD5HQIvHnV4xE3euenIOvMr4pIc=; b=MBAlCEJfkgwuMD/4kztZJ8n8Hhgt8j3noON6ojZ3xhaPci5jfah0CsAL+xhNvLRjZ1YXJ2Z8D+LIO/sSUaW5ivIPPPKZPmpyPPOsZFsI9o9+pqEpH1d3ZLxFpveW/MxWDIQgkTYJ/hnrIj45YiZ2v7N6qs8wVEXy/ZkTFRMP7QT/Pnt37PW17IGNONW6U59UQQmc+fSHVkiXHVq7gnRVbJ1lUkJ0gzcmsFM+37nAh7zagNe/GVYfRRWSpFr1OzvkQXKdOcRJPKihvP7pnAkuMYQneHfReuExznlARP5Q6FcJZbHRsVgj/7VjAg6ZiQ0I7CcdV2L7C154KZLeobu06g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Received: from DM4PR11MB7303.namprd11.prod.outlook.com (2603:10b6:8:108::21) by PH7PR11MB6450.namprd11.prod.outlook.com (2603:10b6:510:1f5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6544.24; Wed, 5 Jul 2023 11:22:56 +0000 Received: from DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::e57e:3584:99ad:d384]) by DM4PR11MB7303.namprd11.prod.outlook.com ([fe80::e57e:3584:99ad:d384%7]) with mapi id 15.20.6565.016; Wed, 5 Jul 2023 11:22:56 +0000 From: "Aktemur, Tankut Baris" To: Andrew Burgess , "gdb-patches@sourceware.org" Subject: RE: [PATCHv2 6/8] gdb/testsuite: expand gdb.base/foll-vfork.exp Thread-Topic: [PATCHv2 6/8] gdb/testsuite: expand gdb.base/foll-vfork.exp Thread-Index: AQHZrot7TGCzN+nibkOjtH6CYz9WyK+rBuaA Date: Wed, 5 Jul 2023 11:22:56 +0000 Message-ID: References: <20cb4bbc67707268a75d32b8eaa539758ac4b31b.1688484032.git.aburgess@redhat.com> In-Reply-To: <20cb4bbc67707268a75d32b8eaa539758ac4b31b.1688484032.git.aburgess@redhat.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: DM4PR11MB7303:EE_|PH7PR11MB6450:EE_ x-ms-office365-filtering-correlation-id: faa4d58c-4f49-4290-8e7d-08db7d4a2e50 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: nkQR5qWBXvdIAKpm73uVUo/syBdtG9TJRBSPMCNQtslllTyVWKpakcg3Q0Xln1b4ZtJnugmvM3gSHfeabhu3hKzgL9gFJ1jqeVlW/CHoMyd2LjihxDnZzRMxyEt3GsWBVP6KsdQMM0ME0WDkOhR22jHDfU1vYjC3asNLDSnLEm9W5d8aVv5+DlTD3VPHK9bjsQCXhw6MEp65+gxMuhDYVBf6O2EUTcZ841C+bEfaPCsiIplgd/t8ukq8F0PCKaEIp/ukKdzYlpSuYitZ7wFrWBRRq3etyTuUGA0bMLOr6yiiwiGyNOl8ZrKtbRHhrsCrwQx8hU5xKqmpxDWHGiX3YRPfLTLFLkyugGPrHty1sDt508RHjVjIPcK0zfGWSOhwMgFSEGzvi/NSTcVdki6OynFQhkK+KtT/9gFYydJeQBbDZZ85IRhbRq0B97fOSMPnsv8XgoZb2eLs9KAdtLzgMSBI+oUocyOLGQeaFhax3+LhlukKbSyol0SiuDiYLjUeQBNV/54YM4czV16ZyvqSdiQ1QpzfKqiPBzjaGOnkNHKJj5RAkXDfH4g6HyeMSTVvFp98ZwXbxse8sPsFFDc15Mi0wdj83FefSCl+RvU2Ihs= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DM4PR11MB7303.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(346002)(39860400002)(396003)(376002)(366004)(136003)(451199021)(26005)(478600001)(6506007)(9686003)(84970400001)(82960400001)(966005)(71200400001)(86362001)(186003)(53546011)(66556008)(38100700002)(66476007)(64756008)(66946007)(66446008)(110136005)(83380400001)(76116006)(7696005)(122000001)(316002)(8676002)(52536014)(8936002)(38070700005)(41300700001)(2906002)(55016003)(5660300002)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?ORNW5AGhLpFPwokupIhQLDm5F8nQHVAIGeXeJIpgaOPWMfm44jOBsqHe+DGO?= =?us-ascii?Q?mzoWPca5yIxJ3vMm1KPzLifZkZNFVnTTfq/WizH9qhXe3CDgf72J0i0ojAKB?= =?us-ascii?Q?EUaWpxk9/t4Lj71PQJ5UVr8dRbtQue9VT10alPmCQ3mQVt2oNpX3o1d9eT5o?= =?us-ascii?Q?9JNY9YA3DbWi0/SYfpdqQa7yznnw1q6MPC61CunphfbFhlyBLKs6UjhPSSE5?= =?us-ascii?Q?f+rrGNYi77I1mkgAVtTMhc7Ucv/bvPz6KVVMqWRzxuOcHgBDoqV4D9lRULt4?= =?us-ascii?Q?wpoeNxzhkElU/EkriA4qyi/ILFPUNL1BUNLo4uTaLJjB0iEwt5rVSLoTwGGv?= =?us-ascii?Q?lQTh9eLNk/1fa5EMDmsSNmkcRxvw6TRMNRpI/4c8KDaF/YymFc6Hiwgb1AEK?= =?us-ascii?Q?/ycRQiJP/AKLpM/7wxqJDmBQqFzMG56RK+N1cgtUZyjCTPM88vgM/C4H9aXM?= =?us-ascii?Q?+VUCfNxmEdtTGeyJzOqfq3B+/Vs8Q9Vy1lunK2pkKG1mVUXTGDdMHKmNTbXN?= =?us-ascii?Q?9DqNQm+DW5w65sctODopwVENVOhTp7Cm7Aorrw03t8RfRVOL8zrwcYt6/174?= =?us-ascii?Q?X6jIXC5WfSNJcOSw13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ZbrIKxPOc8Azl?= =?us-ascii?Q?Vq6ghhHm3AJVoTXDv1cjyNGvng7AxslZAIswZbguBH+DijAvjLgOIg0bVm2O?= =?us-ascii?Q?qUcB8sRbKfq4DXZTe2DM10sDlBwRCbM5de4QDsF64B9Lsz065u3lt5ji75VZ?= =?us-ascii?Q?ww=3D=3D?= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB7303.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: faa4d58c-4f49-4290-8e7d-08db7d4a2e50 X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Jul 2023 11:22:56.1072 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 0qIDU2AuMZ1GlI1DU8JlUYG2/vkQxPAWZ0+FfGUud75bqwRPNVdr9OFGvg3JHds3s4rVqtV5StMckLhdqwezJs/eXDv/wtoRbu6H9pTNpto= X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR11MB6450 X-OriginatorOrg: intel.com Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_NONE,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 List-Id: On Tuesday, July 4, 2023 5:23 PM, Andrew Burgess wrote: > This commit provides tests for all of the bugs fixed in the previous > four commits, this is achieved by expanding gdb.base/foll-vfork.exp to > run with different configurations: > = > * target-non-stop on/off > * non-stop on/off > * schedule-multiple on/off > = > We don't test with schedule-multiple on if we are using a remote > target, this is due to bug gdb/30574. I've added a link to that bug > in this commit, but all this commit does is expose that bug, there's > no fixes here. > = > Some of the bugs fixed in the previous commits are very timing > dependent, as such, they don't always show up. I've had more success > when running this test on a very loaded machine -- I usually run ~8 > copies of the test in parallel, then the bugs would normally show up > pretty quickly. > = > Other than running the test in more configurations, I've not made any > changes to what is actually being tested, other than in one place > where, when testing with non-stop mode, GDB stops in a different > inferior, as such I had to add a new 'inferior 2' call, this can be > found in vfork_relations_in_info_inferiors. > = > I have cleaned things up a little, for example, making use of > proc_with_prefix to remove some with_test_prefix calls. > = > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30574 > --- > gdb/testsuite/gdb.base/foll-vfork.exp | 628 ++++++++++++-------------- > 1 file changed, 300 insertions(+), 328 deletions(-) > = > diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.ba= se/foll- > vfork.exp > index bdceff0f5de..be0715b05c0 100644 > --- a/gdb/testsuite/gdb.base/foll-vfork.exp > +++ b/gdb/testsuite/gdb.base/foll-vfork.exp > @@ -25,56 +25,52 @@ if {![istarget "*-linux*"]} { > continue > } > = > -standard_testfile > +standard_testfile .c -exit.c vforked-prog.c > = > -set compile_options debug > +set binfile $testfile > +set binfile2 ${testfile}-exit > +set binfile3 vforked-prog > = > -if {[build_executable $testfile.exp $testfile $srcfile $compile_options]= =3D=3D -1} { > +if {[build_executable "compile $binfile" $binfile $srcfile] =3D=3D -1} { > untested "failed to compile main testcase" > return -1 > } > = > -set testfile2 "vforked-prog" > -set srcfile2 ${testfile2}.c > +if {[build_executable "compile $binfile2" $binfile2 $srcfile2] =3D=3D -1= } { > + untested "failed to compile main testcase" A slightly different message can be used here, to distinguish it from the case above. Also in the untested usage below. > + return -1 > +} > = > -if {[build_executable $testfile.exp $testfile2 $srcfile2 $compile_option= s] =3D=3D -1} { > - untested "failed to compile secondary testcase" > +if {[build_executable "compile $binfile3" $binfile3 $srcfile3] =3D=3D -1= } { > + untested "failed to compile main testcase" > return -1 > } > = ... > +proc_with_prefix vfork_child_follow_to_exit { binfile srcfile } { > + setup_gdb $binfile $srcfile > + > + gdb_test_no_output "set follow-fork child" > + > + gdb_test_multiple "continue" "continue to child exit" { > + -re -wrap "Couldn't get registers.*" { > + # PR gdb/14766 > + fail $gdb_test_name Since this is known, we can use a setup_kfail, I think. > + } > + -re -wrap "\\\[Attaching after.* vfork to.*\\\[Detaching vfork parent .= * after > child exit.*" { > + pass $gdb_test_name > + } > + } > + > + # The parent has been detached; allow time for any output it might > + # generate to arrive, so that output doesn't get confused with > + # any gdb_expected debugger output from a subsequent testpoint. > + # > + exec sleep 1 > +} > + ... > +proc_with_prefix vfork_relations_in_info_inferiors { variant binfile src= file > non_stop } { > + setup_gdb $binfile $srcfile > + > + gdb_test_no_output "set follow-fork child" > + > + gdb_test_multiple "next" "next over vfork" { > + -re -wrap "\\\[Attaching after .* vfork to child.*if \\(pid =3D=3D 0\\)= .*" { > + pass $gdb_test_name > + } > + } > + > + if { $non_stop } { > + gdb_test "inferior 2" ".*" > + } > + > + gdb_test "info inferiors" \ > + ".*is vfork parent of inferior 2.*is vfork child of inferior 1" \ > + "info inferiors shows vfork parent/child relation" > + > + if { $variant =3D=3D "exec" } { > + set linenum [gdb_get_line_number "Hello from vforked-prog" ${::srcfile3= }] > + gdb_test_multiple "continue" "continue to bp" { > + -re -wrap ".*xecuting new program.*Breakpoint.*vforked-prog.c:${lin= enum}.*" > { > + pass $gdb_test_name > + } > + } > + } else { > + gdb_test_multiple "continue" "continue to child exit" { > + -re -wrap "exited normally.*" { > + pass $gdb_test_name > } How about using gdb_continue_to_end instead of this gdb_test_multiple? Thanks -Baris Intel Deutschland GmbH Registered Address: Am Campeon 10, 85579 Neubiberg, Germany Tel: +49 89 99 8853-0, www.intel.de Managing Directors: Christin Eisenschmid, Sharon Heck, Tiffany Doon Silva = Chairperson of the Supervisory Board: Nicole Lau Registered Office: Munich Commercial Register: Amtsgericht Muenchen HRB 186928