This is the mail archive of the
ecos-patches@sources.redhat.com
mailing list for the eCos project.
Re: FWD: SNTP client package
- From: Robin Farine <robin dot farine at acn-group dot ch>
- To: eCos Patches List <ecos-patches at sources dot redhat dot com>
- Date: 25 Feb 2003 17:01:12 +0100
- Subject: Re: FWD: SNTP client package
- References: <20030225094253.GA11159@biferten.ma.tech.ascom.ch> <3E5B8E6C.8070706@eCosCentric.com>
On Tue, 2003-02-25 at 16:40, Jonathan Larmour wrote:
> > + break;
> > + }
> > + tm.tm_mon = i;
> > + tm.tm_mday++;
> > +
> > + build_time = mktime(&tm);
> > + CYG_ASSERT(-1 != build_time,"mktime returned -1");
> > +
> > + if (build_time > time(NULL)) {
> > + CYG_TEST_FAIL_FINISH("Build time is ahead of SNTP time");
> > + } else {
> > + if ((build_time + 60 * 60 * 24 * 10) > time(NULL)) {
> > + CYG_TEST_FAIL_FINISH("Build time is more than 10 days old");
> > + }
>
> Hmm... I'm not entirely happy with this. This implies tests can get out of
> date over time. Obviously it's useful to have some baseline to test, but
> I'm not sure this is advisable. Comments from anyone else on this?
Uh, yes, shouldn't the second condition read (less instead of greater
than)?
if ((build_time + 60 * 60 * 24 * 10) < time(NULL)) {
--
rnf