From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id E2DA93858D3C for ; Tue, 19 Sep 2023 13:56:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E2DA93858D3C Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=polymtl.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=polymtl.ca Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 38JDuDlC000992 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 19 Sep 2023 09:56:18 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 38JDuDlC000992 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=polymtl.ca; s=default; t=1695131778; bh=6GiYeGGK7jE77s0t5gPlELGrk0ezf9NycK2yxA7Dtkw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=OOlqksIXolWADYeeJ7QrS6yy0vYZGSNqQRJ+mhjzjJRbGzmPnDxzkfPzF/sz979bY RNphKqlF5w2joV8dkGzqXUOliBqbaiIH24mQrcPlC7CQu0htKPXgMEVMhMAH2cch3T Vmu94rNRPuoub2aUc58cD4NMrqnWxAToLEjnimV4= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 81ABF1E092; Tue, 19 Sep 2023 09:56:13 -0400 (EDT) Message-ID: <03873449-c94f-496e-a12f-212f2bd3199a@polymtl.ca> Date: Tue, 19 Sep 2023 09:56:12 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb/testsuite: add xfail for gdb/29965 in gdb.threads/process-exit-status-is-leader-exit-status.exp Content-Language: fr To: Simon Marchi , gdb-patches@sourceware.org References: <20230908015356.406003-1-simon.marchi@efficios.com> From: Simon Marchi In-Reply-To: <20230908015356.406003-1-simon.marchi@efficios.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Tue, 19 Sep 2023 13:56:13 +0000 X-Spam-Status: No, score=-3037.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,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: Ping. On 9/7/23 21:53, Simon Marchi via Gdb-patches wrote: > Bug 29965 shows on a Linux kernel >= 6.1, that test fails consistently > with: > > FAIL: gdb.threads/process-exit-status-is-leader-exit-status.exp: iteration=0: continue (the program exited) > ... > FAIL: gdb.threads/process-exit-status-is-leader-exit-status.exp: iteration=9: continue (the program exited) > > This is due to a change in Linux kernel behavior [1] that affects > exactly what this test tests. That is, if multiple threads (including > the leader) call SYS_exit, the exit status of the process should be the > exit status of the leader. After that change in the kernel, it is no > longer the case. > > Add an xfail in the test, based on the Linux kernel version. The goal > is that if a regression is introduced in GDB regarding this feature, it > should be caught if running on an older kernel where the behavior was > consistent. > > [1] https://bugzilla.suse.com/show_bug.cgi?id=1206926 > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29965 > Change-Id: If6ab7171c92bfc1a3b961c7179e26611773969eb > --- > ...cess-exit-status-is-leader-exit-status.exp | 21 ++++++++++++++++++- > 1 file changed, 20 insertions(+), 1 deletion(-) > > diff --git a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp > index f64d6a73deaf..2bc73fdde07f 100644 > --- a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp > +++ b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp > @@ -41,6 +41,25 @@ for {set iteration 0} {$iteration < 10} {incr iteration} { > return > } > > - gdb_test "continue" "\\\[Inferior 1 \\(.*\\) exited with code 01\\\]" > + gdb_test_multiple "continue" "" { > + -re -wrap "\\\[Inferior 1 \\(.*\\) exited with code 01\\\]" { > + pass $gdb_test_name > + } > + > + -re -wrap "\\\[Inferior 1 \\(.*\\) exited with code $::decimal\\\]" { > + set lkv [linux_kernel_version] > + > + if { [llength $lkv] != 0 } { > + lassign $lkv major minor patch > + > + if { ($major == 6 && $minor >= 1) || $major > 6 } { > + xfail "$gdb_test_name (PR 29965)" > + return > + } > + } > + > + fail $gdb_test_name > + } > + } > } > } > > base-commit: def2803789208a617c429b5dcf2026decb25ce0c > -- > 2.42.0 >