delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/11/17/13:53:53

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=B0/q4J4ACCqFxQXDUyeESWp+DDHqJJ7JlZnJkjWQEFk
N5EB7tucypWd/cG8FAzpHchQdK4btKCEwSU0ar6EK2wLoJ4Fr7Z0ya1PGARXNzgB
i2YSJbP48S0dQ2ldk/xJ3X3XlN2oW3AH7v/UL9Wzk/tA8c3mA4kVbKEl5GzmykoA
=
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:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=wVzDumLyZr5sVumIUipsLN9WUxA=; b=rg4h/hoQkX2YuQdKi
eUV8U/A2Rq7XllejiqgS4oVZhNMZAXngdF1QjNCBHc27ddT1IkKgLmXQL1t3cVBh
MeHyCZSvLjxdLTDRq+t5Ir30XirZHSgLmoWN+GXcj/bV6pLI66/tx2BgZn3+rsPc
fNzGDd2IPVvjlgkjw7K5TyK9JQ=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=3.2 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_COUK,KAM_FROM_URIBL_PCCC,SPF_PASS autolearn=no version=3.3.2
X-HELO: out.ipsmtp3nec.opaltelecom.net
X-SMTPAUTH: drstacey AT tiscali DOT co DOT uk
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: ApUBAG1DalRV0kHD/2dsb2JhbAANTodCzUuDIAKBMAEBAQEBhQABAQQjFVELGAICBSECAg8CRhMIAQHDbXiWFwEBAQcBAQEBHoEtjzBMFoJhgVQFkB+bP4tmeAGBBYM4AQEB
X-IPAS-Result: ApUBAG1DalRV0kHD/2dsb2JhbAANTodCzUuDIAKBMAEBAQEBhQABAQQjFVELGAICBSECAg8CRhMIAQHDbXiWFwEBAQcBAQEBHoEtjzBMFoJhgVQFkB+bP4tmeAGBBYM4AQEB
Message-ID: <546A4426.40102@tiscali.co.uk>
Date: Mon, 17 Nov 2014 18:53:26 +0000
From: David Stacey <drstacey AT tiscali DOT co DOT uk>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Poco test using clock_gettime() and gettimeofday()
References: <546785C6 DOT 4030303 AT tiscali DOT co DOT uk> <20141117124142 DOT GF3151 AT calimero DOT vinschen DOT de>
In-Reply-To: <20141117124142.GF3151@calimero.vinschen.de>
X-IsSubscribed: yes

On 17/11/14 12:41, Corinna Vinschen wrote:
> On Nov 15 16:56, David Stacey wrote:
>>   I'm not convinced that the test is valid. Poco seems to be making
>>   assumptions about clock_gettime() and gettimeofday() that simply aren't
>>   guaranteed to hold - but obviously do in Fedora at least. For instance, the
>>   test must be assuming that either the accuracy of the two routines is
>>   identical, or be making assumptions about rounding in the less accurate
>>   routine.
>>   
>>   I think it would be better to patch the test so that it uses clock_gettime()
>>   exclusively (and not gettimeofday() at all), and then this problem will
>>   disappear. But I thought I would submit it here to see what you thought
>>   before raising a ticket with the Poco developers.
>>   
>>   What do you think?
> Same as you.  One problem is that CLOCK_REALTIME (which is the one used
> by gettimeofday) is not monotonic by definition, see for instance the
> Linux man page:
>
>    This  clock is  affected by discontinuous jumps in the system time
>    (e.g., if the system administrator manually changes the clock), and by
>    the incremental adjustments performed by adjtime(3) and NTP.
>
> The second problem, and that's the one affecting this testcase mostly,
> is the accuracy of the timer (see clock_getres function).

Thank you for confirming my suspicions. I'll patch the test and roll a 
poco-1.4.7 later in the week. I'll also raise a ticket and get this 
fixed upstream.

Thanks once again,

Dave.


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019