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


Andrew Lunn wrote:
On Tue, Feb 25, 2003 at 05:01:12PM +0100, Robin Farine wrote:

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?


My intention is to have some degree of sanity check. Have i decoded
the time correctly. So the test fails if the test was compiled
sometime in the future, or more than ten days ago. 10 days is an
arbitrary number. I could make it 1 month, a year etc...

Can I suggest 3 months then as a compromise. I'm still not very keen on the principle as such but 3 months should definitely be okay. I know sometimes in the test farm in Red Hat some failures wouldn't be looked at for over a month, and the original test executables were kept around for guaranteed reproduction. Rare I know, but it could be a pain if it happened :-).


One other thought occurred to me: should the test maybe not be built by default anyway, just like the other net tests aren't... just because an eth device is present doesn't mean it works, e.g. if it hasn't been configured correctly yet! I'm just thinking of automated test runs here where stuff is just building and running all the tests.

Should this be added to the net template too? Presumably the all template at least.

Jifl
--
eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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