From patchwork Mon Apr 7 14:03:32 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Stefan Liebler X-Patchwork-Id: 419 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx20.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 10F9336007C for ; Mon, 7 Apr 2014 07:03:52 -0700 (PDT) Received: by homiemail-mx20.g.dreamhost.com (Postfix, from userid 14307373) id BB08840D4FB30; Mon, 7 Apr 2014 07:03:51 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx20.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx20.g.dreamhost.com (Postfix) with ESMTPS id 99533414CB696 for ; Mon, 7 Apr 2014 07:03:51 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:in-reply-to; q=dns; s=default; b=MiXb 2GySZ8oLyuBoS3uNw7lVQ6bOidaKiOqRWbMob91kUnnvwkN+UKWkniHCDrMYjeQF bww2ATWaAjTMUICeFE1yufv62xdq88U97aO89pLuRAyt7QZy7q4dMV8UXs9K2D+7 IqulqZirWoGuu33qm1PBdBZCqftbrxYbuYjhmek= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:date:message-id:references :mime-version:content-type:in-reply-to; s=default; bh=YOgqJ4DZtz 87GXiPAHZaaI6jiqU=; b=jZh9ujlVIh9g+hr8QgYuu9VUtq+fmZoRt8hqyoblPN B+JjkhUlRNQosgwg/m+U0c+FkCtMIzuufFLN6J8aGVaJyYaeSEC91RR++hLu+pgt ZorrlRplnTXYZxrI7bO8WODT3efBCxCQIox26g40JWhb/uQlNmIStVtHC/NVGU8W c= Received: (qmail 11090 invoked by alias); 7 Apr 2014 14:03:49 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 11072 invoked by uid 89); 7 Apr 2014 14:03:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: plane.gmane.org To: libc-alpha@sourceware.org From: Stefan Liebler Subject: Re: [PATCH] Correct minimal test suite changes for elision enabled kernels. Date: Mon, 07 Apr 2014 16:03:32 +0200 Lines: 83 Message-ID: References: <533E9CF2.8030306@linux.vnet.ibm.com> Mime-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0 In-Reply-To: <533E9CF2.8030306@linux.vnet.ibm.com> X-DH-Original-To: glibc@patchwork.siddhesh.in Hi, according to the comment of Andi Kleen (see below), i´ve dropped the ifdef. Please test it on an intel machine with lock elision support! Bye --- 2014-04-07 Stefan Liebler * nptl/tst-mutex5 (do_test): Remove #ifdef ENABLE_LOCK_ELISION. --- On Fri, Apr 04, 2014 at 01:52:18PM +0200, Stefan Liebler wrote: > Hi, > > according to the comment in > "Re: [PATCH 03/14] Add minimal test suite changes for elision > enabled kernels" > (https://www.sourceware.org/ml/libc-alpha/2013-06/msg01145.html), > the tests tst-mutex5/8 are changed in order to not check some > behaviour of POSIX if lock elision is enabled at configure time. > Currently, the timeout of pthread_mutex_timedlock is only tested > with elision enabled at configure time and not for the default case. If it works with elision we can actually drop the ifdef, as it should work in both cases. May have been a left over from before trylock aborted. -Andi > > Bye > > --- > 2014-04-04 Stefan Liebler > > * nptl/tst-mutex5 (do_test): > Use #ifndef ENABLE_LOCK_ELISION instead of #ifdef. > --- > diff --git a/nptl/tst-mutex5.c b/nptl/tst-mutex5.c > index 14d3025..a829272 100644 > --- a/nptl/tst-mutex5.c > +++ b/nptl/tst-mutex5.c > @@ -87,7 +87,7 @@ do_test (void) > } > > /* Elided locks do not time out. */ > -#ifdef ENABLE_LOCK_ELISION > +#ifndef ENABLE_LOCK_ELISION > if (pthread_mutex_trylock (&m) == 0) > { > puts ("mutex_trylock succeeded"); -- ak@linux.intel.com -- Speaking for myself only diff --git a/nptl/tst-mutex5.c b/nptl/tst-mutex5.c index 14d3025..6988840 100644 --- a/nptl/tst-mutex5.c +++ b/nptl/tst-mutex5.c @@ -86,8 +86,6 @@ do_test (void) return 1; } - /* Elided locks do not time out. */ -#ifdef ENABLE_LOCK_ELISION if (pthread_mutex_trylock (&m) == 0) { puts ("mutex_trylock succeeded"); @@ -183,7 +181,6 @@ do_test (void) puts ("3rd timedlock didn't return right away"); return 1; } -#endif if (pthread_mutex_unlock (&m) != 0) {