From owner-freebsd-current@FreeBSD.ORG Wed Aug 20 14:54:42 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FFEB106566B; Wed, 20 Aug 2008 14:54:42 +0000 (UTC) (envelope-from ru@freebsd.org) Received: from mail.vega.ru (infra.dev.vega.ru [90.156.167.14]) by mx1.freebsd.org (Postfix) with ESMTP id D6E178FC13; Wed, 20 Aug 2008 14:54:41 +0000 (UTC) (envelope-from ru@freebsd.org) Received: from [87.242.97.68] (port=65469 helo=edoofus.dev.vega.ru) by mail.vega.ru with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68 (FreeBSD)) (envelope-from ) id 1KVp55-000CXd-Co; Wed, 20 Aug 2008 14:54:39 +0000 Date: Wed, 20 Aug 2008 18:53:52 +0400 From: Ruslan Ermilov To: Dag-Erling Sm??rgrav Message-ID: <20080820145352.GA17342@edoofus.dev.vega.ru> References: <20080813185600.B88E373039@freebsd-current.sentex.ca> <86abfgs5v6.fsf@ds4.des.no> <20080819171105.GB19836@edoofus.dev.vega.ru> <86tzdgje09.fsf@ds4.des.no> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86tzdgje09.fsf@ds4.des.no> Cc: FreeBSD Tinderbox , current@freebsd.org Subject: Re: [head tinderbox] failure on amd64/amd64 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Aug 2008 14:54:42 -0000 On Wed, Aug 20, 2008 at 10:18:30AM +0200, Dag-Erling Sm??rgrav wrote: > Ruslan Ermilov writes: > > "-mtime -0" interacts badly with the TIME_CORRECT() macro when mtime > > and run-time happen to be the same second. While I think it's a bug > > in the find(1) code that needs to be fixed, using "-mtime -0s" seems > > to avoid the macro and thus works as expected. > -mtime -0s (note the minus before "0s"). > % date ; touch foo ; find foo -mtime 0s ; date ; sleep 1 ; find foo -mtime 0s ; date > Wed Aug 20 10:09:11 CEST 2008 > foo > Wed Aug 20 10:09:11 CEST 2008 > Wed Aug 20 10:09:12 CEST 2008 > % date ; touch foo ; find foo -mtime 0s ; date ; sleep 1 ; find foo -mtime 1s ; date > Wed Aug 20 10:11:23 CEST 2008 > foo > Wed Aug 20 10:11:23 CEST 2008 > foo > Wed Aug 20 10:11:24 CEST 2008 > > '-mtime Ns' evaluates to true if the difference between current time and > the file's mtime is *exactly* N seconds. > > '-mtime N' evaluates to true if the difference between current time and > the file's mtime is between N-1 and N days. > > As written, the test will fail if sys/sys/param.h's mtime is between now > and 86399 seconds into the future, and succeed otherwise. If we change > 0 to 0s, it will fail if sys/sys/param.h's mtime is exactly the current > time, and succeed otherwise. > > Personally, I think the test is useless, as there are a million other > ways to mess up your build, but if you absolutely must have it there, > the correct predicate would be '-newermt now'. > > DES > -- > Dag-Erling Sm??rgrav - des@des.no > -- Ruslan Ermilov ru@FreeBSD.org FreeBSD committer