From patchwork Thu May 23 13:14:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans-Peter Nilsson X-Patchwork-Id: 1104119 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-501541-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=axis.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="Q50TxGPF"; dkim-atps=neutral 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 ozlabs.org (Postfix) with ESMTPS id 458qhl1T2Wz9s1c for ; Thu, 23 May 2019 23:14:14 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=AFhBJg7+gfSeShbt L+7pUtAx6hpFp0kJ0SK7TiE6SAe7Uw81j5BrqY8wD2Txh/dN12iE3S+gy1N6Txj3 2ffwWspb3BYVBmTXR0YCMFe/vNSIkuyCCIPP8okoj0iqqTanE/ssSdqiATv8i63z D9veX2AKlpmabz9DVUq+kqbKSFM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :message-id:from:to:subject:mime-version:content-type :content-transfer-encoding; s=default; bh=QMfFtGBGN5uvlsSLxFTVNR C+95Q=; b=Q50TxGPFtuThU7At9KUCX7jdBGcBQVVlCCRj0B5p0XP+so0k8CciIp /kdhyedFuGHVtoFyA33jwbXh6TKeEbZE73weihLmxMpiTBOjvAuHwf4t+IBwGib8 xWUqxMNYedXiFI2/+zPl14chrEfd4fe+Lwou4rovk9s+JKTOSAqlQ= Received: (qmail 73689 invoked by alias); 23 May 2019 13:14:07 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 73674 invoked by uid 89); 23 May 2019 13:14:07 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-20.0 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=ticket, extremely X-HELO: bastet.se.axis.com Received: from bastet.se.axis.com (HELO bastet.se.axis.com) (195.60.68.11) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 23 May 2019 13:14:04 +0000 Received: from localhost (localhost [127.0.0.1]) by bastet.se.axis.com (Postfix) with ESMTP id 7380F185A8; Thu, 23 May 2019 15:14:02 +0200 (CEST) X-Axis-User: NO X-Axis-NonUser: YES Received: from bastet.se.axis.com ([IPv6:::ffff:127.0.0.1]) by localhost (bastet.se.axis.com [::ffff:127.0.0.1]) (amavisd-new, port 10024) with LMTP id z3abEMRSVvih; Thu, 23 May 2019 15:14:01 +0200 (CEST) Received: from boulder03.se.axis.com (boulder03.se.axis.com [10.0.8.17]) by bastet.se.axis.com (Postfix) with ESMTPS id 29FBB185AA; Thu, 23 May 2019 15:14:01 +0200 (CEST) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 178D71E086; Thu, 23 May 2019 15:14:01 +0200 (CEST) Received: from boulder03.se.axis.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 083261E083; Thu, 23 May 2019 15:14:01 +0200 (CEST) Received: from thoth.se.axis.com (unknown [10.0.2.173]) by boulder03.se.axis.com (Postfix) with ESMTP; Thu, 23 May 2019 15:14:00 +0200 (CEST) Received: from ignucius.se.axis.com (ignucius.se.axis.com [10.88.21.50]) by thoth.se.axis.com (Postfix) with ESMTP id EFF7A1123; Thu, 23 May 2019 15:14:00 +0200 (CEST) Received: from ignucius.se.axis.com (localhost [127.0.0.1]) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) with ESMTP id x4NDE0Dl024350; Thu, 23 May 2019 15:14:00 +0200 Received: (from hp@localhost) by ignucius.se.axis.com (8.12.8p1/8.12.8/Debian-2woody1) id x4NDE0o9024346; Thu, 23 May 2019 15:14:00 +0200 Date: Thu, 23 May 2019 15:14:00 +0200 Message-Id: <201905231314.x4NDE0o9024346@ignucius.se.axis.com> From: Hans-Peter Nilsson To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Fix simulator timeout for testsuite/26_numerics/random/poisson_distribution/operators/values.cc MIME-Version: 1.0 This test regressed for cris-elf (testing in a simulator) with the fixing of libstdc++/83237, as the part suggested to be wrapped in #ifndef was *added* to the existing test and causes a timeout. Tsk tsk. Please don't pile-on existing tests, instead add a *separate* test-file. From what I understand of the libstdc++/83237 thread at , the high numbers are not arbitrary, so it seems wrong to try lowering them, or we'd just waste cycles testing nothing, or worse, ending up with a bogus error indication. Better to just plain disable this part of the test for simulator targets; I assume the results should be the same on any IEEE-float target, i.e. no target-specific things going on here that'd raise a need to cover it everywhere. With this part of the test disabled, I saw the test finishing in (time) "124.74s user" where it was before "1120.26s user" running the cris-elf-run simulator on a "i7-4770K CPU @ 3.50GHz" host. Most certainly that indidates that the remainder of the test is still too much for *some* host+simulator combos, but I'm happy with the runtime lowered to 1/5 of the timeout (10 minutes) on this particular combination, and I'd think this fixes timeouts for many other simulator combos too. This construct (disabling or lowering limits for simulators) is used elsewhere in the libstdc++ test-suite and in particular the SIMULATOR_TEST macro is used in the testsuite machinery (though AFAICT not in testDiscreteDist). Ok to commit? (I didn't open a ticket for this problem.) libstdc++-v3: * testsuite/26_numerics/random/poisson_distribution/operators/values.cc: Don't run the libstdc++/83237 part on simulator targets. brgds, H-P diff --git libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc index 0b03d94..2a45081 100644 --- libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc +++ libstdc++-v3/testsuite/26_numerics/random/poisson_distribution/operators/values.cc @@ -1,3 +1,4 @@ +// { dg-options "-DSIMULATOR_TEST" { target simulator } } // { dg-do run { target c++11 } } // { dg-require-cstdint "" } // { dg-require-cmath "" } @@ -43,11 +44,14 @@ void test01() auto bpd3 = std::bind(pd3, eng); testDiscreteDist(bpd3, [](int n) { return poisson_pdf(n, 30.0); } ); + // This can take extremely long on simulators, timing out the test. +#ifndef SIMULATOR_TEST // libstdc++/83237 std::poisson_distribution<> pd4(37.17); auto bpd4 = std::bind(pd4, eng); testDiscreteDist<100, 2000000>(bpd4, [](int n) { return poisson_pdf(n, 37.17); } ); +#endif } int main()