X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Ftest-timeval.c;h=9896cf7372ff880b8af487c3819e47ee69c36c7b;hb=8e61c1104eddbe737a67cbf559fcb48971f59569;hp=d277fc96983f12171091d6e187d90de6cb1d5eb6;hpb=e0edde6fee279cdbbf3c179f5f50adaf0c7c7f1e;p=openvswitch diff --git a/tests/test-timeval.c b/tests/test-timeval.c index d277fc96..9896cf73 100644 --- a/tests/test-timeval.c +++ b/tests/test-timeval.c @@ -97,6 +97,12 @@ main(int argc, char *argv[]) if (argc != 2) { usage(); } else if (!strcmp(argv[1], "plain")) { + /* If we're not caching time there isn't much to test and SIGALRM won't + * be around to pull us out of the select() call, so just skip out */ + if (!CACHE_TIME) { + exit (77); + } + do_test(); } else if (!strcmp(argv[1], "daemon")) { /* Test that time still advances even in a daemon. This is an @@ -104,6 +110,10 @@ main(int argc, char *argv[]) char cwd[1024], *pidfile; FILE *success; + if (!CACHE_TIME) { + exit (77); + } + assert(getcwd(cwd, sizeof cwd) == cwd); unlink("test-timeval.success");