From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-3.9 required=3.0 tests=AWL,BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id D411B1F461 for ; Tue, 2 Jul 2019 19:41:46 +0000 (UTC) Received: from localhost ([::1]:56708 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiOet-0006ki-9Q for normalperson@yhbt.net; Tue, 02 Jul 2019 15:41:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33047) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiNdJ-0006PJ-Nm for bug-gnulib@gnu.org; Tue, 02 Jul 2019 14:36:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiNdI-0000ki-5r for bug-gnulib@gnu.org; Tue, 02 Jul 2019 14:36:01 -0400 Received: from mo6-p00-ob.smtp.rzone.de ([2a01:238:20a:202:5300::12]:13401) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiNdE-0000Xs-40 for bug-gnulib@gnu.org; Tue, 02 Jul 2019 14:35:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1562092551; s=strato-dkim-0002; d=clisp.org; h=Message-ID:Date:Subject:To:From:X-RZG-CLASS-ID:X-RZG-AUTH:From: Subject:Sender; bh=feRhtKnkfSLKKCeZd+cQtPDGmYV2CWqfbMjPw/ujMxg=; b=DiOyIMSpp3F6TZdilPVRb/RUtUQuxVbFHocb6RPWlnHXP2EHLsl0Sm2gecKw12ZSfz GtwtMxOWd9FqUoRnNkfsBUm6fmNLf3He5ik9H9B97Bm5ByFPr2Yj6qCE60y4fcUvO2mc MBAdd2sMyQ76y2a39dufcvQb5zVL2vtahVqa8sHB7k+Zk+lsFvDMwYoulH+U0Qm5D7lA Y7DZFn1vES7Facpbz08INiWdtr6Ta77adbqmfWiAjFaEcseHnaIhD6O4qk4g1eG2XFhT bqDc8IEMUY9/askEaANURib+gyJb2tvVwYXLuTo2887gOVuAZFALUeR+6pPVE9HEnE4a xO1A== X-RZG-AUTH: ":Ln4Re0+Ic/6oZXR1YgKryK8brlshOcZlIWs+iCP5vnk6shH+AHjwLuWOGaf0zJZW" X-RZG-CLASS-ID: mo00 Received: from bruno.haible.de by smtp.strato.de (RZmta 44.24 DYNA|AUTH) with ESMTPSA id v018bcv62IZp7el (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (curve secp521r1 with 521 ECDH bits, eq. 15360 bits RSA)) (Client did not present a certificate); Tue, 2 Jul 2019 20:35:51 +0200 (CEST) From: Bruno Haible To: bug-gnulib@gnu.org Subject: nonblocking-pipe tests: Fix test failure on MSVC Date: Tue, 02 Jul 2019 20:35:50 +0200 Message-ID: <2733563.9gGRJgI8zD@omega> User-Agent: KMail/5.1.3 (Linux/4.4.0-151-generic; KDE/5.18.0; x86_64; ; ) MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a01:238:20a:202:5300::12 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" On MSVC, I'm seeing this test failure: FAIL: test-nonblocking-pipe.sh ============================== c:\testdir-posix-msvc\gltests\test-nonblocking-reader.h:179: assertion 'spent_time < 1.5' failed FAIL test-nonblocking-pipe.sh (exit status: 1) The comment says: /* This assertion fails if data_block_size is much larger than needed and SMALL_DELAY is too large, or if data_block_size is very large and ENABLE_DEBUGGING is 1. */ And indeed, SMALL_DELAY was 1 second (due to the suboptimal usleep()), and PIPE_DATA_BLOCK_SIZE was 70000. Improving usleep - done in the previous commit - and reducing PIPE_DATA_BLOCK_SIZE fixes the test failure. 2019-07-02 Bruno Haible nonblocking-pipe tests: Fix test failure on MSVC. * tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE): Set to 10000 on native Windows. diff --git a/tests/test-nonblocking-pipe.h b/tests/test-nonblocking-pipe.h index fd101c5..7edb64e 100644 --- a/tests/test-nonblocking-pipe.h +++ b/tests/test-nonblocking-pipe.h @@ -41,6 +41,8 @@ # define PIPE_DATA_BLOCK_SIZE 140000 #elif defined __linux__ && defined __powerpc__ # define PIPE_DATA_BLOCK_SIZE 1100000 +#elif defined _WIN32 && !defined __CYGWIN__ +# define PIPE_DATA_BLOCK_SIZE 10000 #else # define PIPE_DATA_BLOCK_SIZE 70000 #endif