From patchwork Thu Feb 1 12:41:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella Netto X-Patchwork-Id: 126527 Delivered-To: patch@linaro.org Received: by 10.46.124.24 with SMTP id x24csp1670452ljc; Thu, 1 Feb 2018 04:41:26 -0800 (PST) X-Google-Smtp-Source: AH8x225WhY204QMAgxI+Wa3RT4zRq+I9Cr2PJcpcIpDj0qTvPWuWXOlBHDcnk0FJre1czxBvx+iJ X-Received: by 10.99.126.73 with SMTP id o9mr20751175pgn.429.1517488885891; Thu, 01 Feb 2018 04:41:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517488885; cv=none; d=google.com; s=arc-20160816; b=OzaZySzZYacyA9bwOxiUPwhTiYCb9Lw3cC4G+b1nl4yWtv9QNrEzzyQIEc0+l5fT5M FsE63Ac00f0tEB5biu0ckI/7NFlcG8xJMvkrk/OvqYCWmxFCSjBSw1QO9rzsYuzvwSuk 8y5QqDoshbDvjwzUdALDhauyY9gjFuzdV8h1ei+OVewazbUpndVAchI1XiJ0oWp4otcV +QVGNlcj5X/d2mCSOKgJ8PIv8n6go3t8bYq+PbPFrEdtvhmicCOFQBScgyIg1E4wuxQW ddi0QmsUceZ8xAOFFPzwwxEllOMPuKSggmcvb4UsSRtsJ8E1pa7zdN3DkPOz2QcmWAY4 TDnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:to:from:delivered-to:sender:list-help :list-post:list-archive:list-subscribe:list-unsubscribe:list-id :precedence:mailing-list:dkim-signature:domainkey-signature :arc-authentication-results; bh=rtppDf4Oe3MWZsT2Hk0kPPB681g1Aoudou1ptDXOWiU=; b=z/aa60q8gQWKiszs6Al5LqvB7jr90CN+4qdwaFeBf0yOE4/ic06bj8Gpucx/GnN/pV 6iT7CgV3EApQYxLtaurq7a4Dt7I8xTQxDVKpHwdcwm620Eo9wHxfeXEnKbu40O0TafkN HrGKCQCv9LZsLLxLz9KxR0Mlq+8UCJMys9ANiOCx7WJ2ytd/ltq/ywbIHbS8ib0jy00t CUQYcdtZXYcJQVZ5rBZFNsQb06G0xiSrQbPlKjqkTVkgpaUicNQayEIjouqM0pR6cVyb lKS7OdgB4KsugtPWQTmIqooTTbeIBAwzh7yfExqblb77tMA19z9XOXYHTfnTbjb6XtFh +3Rg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AuIZUf1j; spf=pass (google.com: domain of libc-alpha-return-89860-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-89860-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id d4-v6si15640703plr.414.2018.02.01.04.41.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 04:41:25 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-89860-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b=AuIZUf1j; spf=pass (google.com: domain of libc-alpha-return-89860-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-89860-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=w+xiVw+GTyHexAHdY4D24YDc91ScC/Qq8e6rTLyv/wjaQ0F2gY5wU U3q7bN7E1dHqL6zawTFIFlgtcUBFwyrgk7QxLqjnsi4eyMYlpMxTxf0GFZxzhSil UQmabwTeEdSx8omh8HXZGqrnNscL+hYd6VVh4s5lQVLL4qf9AKrIX8= 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:from:to:subject:date:message-id; s=default; bh=y0KCBtmRSZhNx+5pmny53k6kCdc=; b=AuIZUf1j3DiJKqgAYqQr/u+JRCxz B30zuc7ocUAgplzI6jIk9gmXXP27L8JK1cZzQ0acGsbNRtI8Zdzn4P7AseIhhiAq Xb6tHNqa1OTxFKlDjRKQFEfpLbb2pvsHeuxXCTvnKo3jeaLgGLpwQmwvr356iM4c cbE5z8lNOq0vDlM= Received: (qmail 73990 invoked by alias); 1 Feb 2018 12:41:17 -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 73976 invoked by uid 89); 1 Feb 2018 12:41:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mail-qt0-f195.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=rtppDf4Oe3MWZsT2Hk0kPPB681g1Aoudou1ptDXOWiU=; b=fwAETHSQp4rS/Vsv9Xa+00JeXFzvvRHVHMaCZrRCGmzdEM/HQehOsUL1etiABFwzoq zxWo1WTs3TD8j6IzlRmrUzHXLqlVY+ZNHnAg3CUFH/PITiohBe+lFC9klb7GgFUYapHM KuujE1uWThf6x0rzm0vUrBb/rmLNPg2ORrjV0Y4gGhbdGOgCPDvo/rVzMjm3cFQnUCuf cVs2zwF4fy75SitfwgxkvtWfXxLJAbbGFve11algNZLXQWlUDM0KfkxQCHXsosspOeal PjFVtK9Xsz3CtwgXdcjQo9Bu5SKXBQ07bjfAk+D8YHdhz67iK5hIO3Lvn9Oqvh51OEsN JoPQ== X-Gm-Message-State: AKwxytfhHgavSCcClFHhGl3dYTr2sqODV9BI5xvF2JqqmZfst2qlPYFj VNVKLSdURO5aogcBemqbAVbvuwZNor4= X-Received: by 10.200.61.146 with SMTP id v18mr51805158qtf.28.1517488873418; Thu, 01 Feb 2018 04:41:13 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] stdlib: Fixing test-*atexit*-race tests on ia64 Date: Thu, 1 Feb 2018 10:41:05 -0200 Message-Id: <1517488865-1052-1-git-send-email-adhemerval.zanella@linaro.org> The tests requires a new thread stack size to a value (0x20000) lower than architecture minimum (0x3000). Set PTHREAD_STACK_MIN in this case. Checked on ia64-linux-gnu. * stdlib/test-atexit-race-common.c (do_test): Check stack size against PTHREAD_STACK_MIN. --- ChangeLog | 5 +++++ stdlib/test-atexit-race-common.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/stdlib/test-atexit-race-common.c b/stdlib/test-atexit-race-common.c index 4d7f911..02d459c 100644 --- a/stdlib/test-atexit-race-common.c +++ b/stdlib/test-atexit-race-common.c @@ -34,9 +34,11 @@ #include #include #include +#include const size_t kNumThreads = 1024; const size_t kNumHandlers = 1024; +const size_t kStacksize = 0x20000; static void * threadfunc (void *unused) @@ -60,7 +62,8 @@ do_test (void) /* With default 8MiB Linux stack size, creating 1024 threads can cause VM exhausiton on 32-bit machines. Reduce stack size of each thread to 128KiB for a maximum required VM size of 128MiB. */ - xpthread_attr_setstacksize (&attr, 128 * 1024); + size_t ss = kStacksize < PTHREAD_STACK_MIN ? PTHREAD_STACK_MIN : kStacksize; + xpthread_attr_setstacksize (&attr, ss); for (i = 0; i < kNumThreads; ++i) { xpthread_create (&attr, threadfunc, NULL);