From owner-svn-src-head@freebsd.org Fri Jul 27 20:39:50 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A4B210561AF for ; Fri, 27 Jul 2018 20:39:50 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery6.ore.mailhop.org (pmta2.delivery6.ore.mailhop.org [54.200.129.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07ED486C89 for ; Fri, 27 Jul 2018 20:39:49 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-RoutePath: aGlwcGll X-MHO-User: 32cbc4af-91dd-11e8-904b-1d2e466b3c59 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound2.ore.mailhop.org (Halon) with ESMTPSA id 32cbc4af-91dd-11e8-904b-1d2e466b3c59; Fri, 27 Jul 2018 20:39:46 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id w6RKdjT0024784; Fri, 27 Jul 2018 14:39:45 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1532723985.61594.88.camel@freebsd.org> Subject: Re: svn commit: r336781 - head/tests/sys/kqueue/libkqueue From: Ian Lepore To: David Bright , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Fri, 27 Jul 2018 14:39:45 -0600 In-Reply-To: <201807272014.w6RKEwAp071679@repo.freebsd.org> References: <201807272014.w6RKEwAp071679@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Jul 2018 20:39:50 -0000 On Fri, 2018-07-27 at 20:14 +0000, David Bright wrote: > Author: dab > Date: Fri Jul 27 20:14:58 2018 > New Revision: 336781 > URL: https://svnweb.freebsd.org/changeset/base/336781 > > Log: >   Fix compilation error on some arches after r336761. >    >   A cast for printing an intmax_t was needed in a kqueue test for > some >   arches. >    >   MFC after: 1 week >   X-MFC-with: r336761 >   Sponsored by: Dell EMC > > Modified: >   head/tests/sys/kqueue/libkqueue/timer.c > > Modified: head/tests/sys/kqueue/libkqueue/timer.c > ===================================================================== > ========= > --- head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 > 20:07:40 2018 (r336780) > +++ head/tests/sys/kqueue/libkqueue/timer.c Fri Jul 27 > 20:14:58 2018 (r336781) > @@ -239,7 +239,7 @@ test_abstime(void) >      kev.fflags = 0; >      kevent_cmp(&kev, kevent_get(kqfd)); >      if (time(NULL) < when + timeout) > - err(1, "too early %jd %jd", time(NULL), when + timeout); > +     err(1, "too early %jd %jd", time(NULL), (intmax_t)(when > + timeout)); >   You also need to cast the return value from time(NULL), it's a time_t as well. Unrelated: time(NULL) is used twice; if control takes the true branch of the if, then the process gets preempted before doing the second time(NULL) call, enough time could elapse that the printed results will be pretty confusing because it will be after when+timeout by then. -- Ian >      /* Check if the event occurs again */ >      sleep(3); >