From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id 334143857C73 for ; Tue, 21 Jul 2020 01:51:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 334143857C73 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-17--YbFwMq4OCisrpffMHkq5A-1; Mon, 20 Jul 2020 21:51:41 -0400 X-MC-Unique: -YbFwMq4OCisrpffMHkq5A-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3C5CA8015F4 for ; Tue, 21 Jul 2020 01:51:40 +0000 (UTC) Received: from f32-m1.lan (ovpn-112-21.phx2.redhat.com [10.3.112.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 21EEC6FEE9 for ; Tue, 21 Jul 2020 01:51:40 +0000 (UTC) Date: Mon, 20 Jul 2020 18:51:39 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: Re: [committed][gdb/testsuite] Stabilize execution order in omp-par-scope.c Message-ID: <20200720185139.7546bbe2@f32-m1.lan> In-Reply-To: <20200720124227.GA14573@delia> References: <20200720124227.GA14573@delia> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 21 Jul 2020 01:51:44 -0000 On Mon, 20 Jul 2020 14:42:28 +0200 Tom de Vries wrote: > Hi, > > In openmp test-case gdb.threads/omp-par-scope.exp we xfail and kfail dependent > on omp_get_thread_num (). Since execution order of the threads can vary from > execution to execution, this can cause changes in test results. > > F.i., we can see this difference between two test runs: > ... > -KFAIL: single_scope: first thread: print i3 (PRMS: gdb/22214) > +PASS: single_scope: first thread: print i3 > -PASS: single_scope: second thread: print i3 > +KFAIL: single_scope: second thread: print i3 (PRMS: gdb/22214) > ... > In both cases, the KFAIL is for omp_get_thread_num () == 1, but in one case > that corresponds to the first thread executing that bit of code, and in the > other case to the second thread. > > Get rid of this difference by stabilizing execution order. > > Tested on x86_64-linux. > > Committed to trunk. Thanks for doing this. Kevin