This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: FWD: SNTP client package


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]