Re: speed up test-stat-time

2009-10-13 Thread Eric Blake
Eric Blake byu.net> writes: > looking at the assembly, it looks like mingw fails to set errno to > EINVAL, but just blindly returns without sleeping). Correction - on mingw, usleep(100) returns EINVAL without touching errno, rather than the POSIX behavior of returning -1 and setting errno

Re: speed up test-stat-time

2009-10-13 Thread Eric Blake
Eric Blake byu.net> writes: > +/* Sleep long enough to notice a timestamp difference on the file > + system in the current directory. */ > +static void > +nap (void) > +{ ... > +delay = 200; > +} > + usleep (delay); Well I feel stupid. POSIX 2008 withdrew usleep in favor of

Re: speed up test-stat-time

2009-10-13 Thread Bruno Haible
Jim Meyering wrote: > In fact, there should be no uses of AC_CHECK_FUNCS in modules/* files. > Of course, there *could* be justification if someone requires > that a function check be conditional ... or if someone augments LIBS, does an AC_CHECK_FUNCS, and restores LIBS afterwards. > Bruno, Paolo

Re: speed up test-stat-time

2009-10-13 Thread Paolo Bonzini
On 10/13/2009 09:47 AM, Bruno Haible wrote: ... or if someone augments LIBS, does an AC_CHECK_FUNCS, and restores LIBS afterwards. Better use a .m4 in that case too, I'd say. Paolo

Re: speed up test-stat-time

2009-10-13 Thread Jim Meyering
Paolo Bonzini wrote: >> configure.ac: >> +AC_CHECK_FUNCS([usleep]) > > AC_CHECK_FUNCS_ONCE is better maybe? Definitely. In fact, there should be no uses of AC_CHECK_FUNCS in modules/* files. Of course, there *could* be justification if someone requires that a function check be conditional, but i

Re: speed up test-stat-time

2009-10-13 Thread Paolo Bonzini
On 10/13/2009 09:23 AM, Jim Meyering wrote: Definitely. In fact, there should be no uses of AC_CHECK_FUNCS in modules/* files. Of course, there*could* be justification if someone requires that a function check be conditional, but if there's enough logic, then you can argue it belongs in a .m4 fi

Re: speed up test-stat-time

2009-10-12 Thread Eric Blake
Paolo Bonzini gnu.org> writes: > > configure.ac: > > +AC_CHECK_FUNCS([usleep]) > > AC_CHECK_FUNCS_ONCE is better maybe? Yep. Also, I was consistently seeing test-utimens failures on a Solaris 8 machine using NFS; I don't know if the bug was limited to Solaris 8, but suspect that other plat

Re: speed up test-stat-time

2009-10-12 Thread Paolo Bonzini
configure.ac: +AC_CHECK_FUNCS([usleep]) AC_CHECK_FUNCS_ONCE is better maybe? Paolo

Re: speed up test-stat-time

2009-10-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 10/9/2009 9:44 PM: > According to Eric Blake on 10/9/2009 12:06 PM: >> Multiple calls to sleep(2) add up fast! I've especially noticed it while >> working on my utimensat series, where repeatedly running 'make check' stalls

Re: speed up test-stat-time

2009-10-10 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 10/10/2009 3:09 AM: >> +#if !HAVE_USLEEP >> + /* Assume the worst case file system of FAT, which has a granularity >> + of 2 seconds. */ >> + sleep (2); >> +#else /* HAVE_USLEEP */ > > Nice. > > However, I saw no i

Re: speed up test-stat-time

2009-10-10 Thread Jim Meyering
Eric Blake wrote: > Multiple calls to sleep(2) add up fast! I've especially noticed it while > working on my utimensat series, where repeatedly running 'make check' stalls > on > this test. Unless you are insane enough to run on FAT, or unlucky enough to > be > on mingw (since I didn't want to

Re: speed up test-stat-time

2009-10-09 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 10/9/2009 12:06 PM: > Multiple calls to sleep(2) add up fast! I've especially noticed it while > working on my utimensat series, where repeatedly running 'make check' stalls > on > this test. Unless you are insane enough

speed up test-stat-time

2009-10-09 Thread Eric Blake
Multiple calls to sleep(2) add up fast! I've especially noticed it while working on my utimensat series, where repeatedly running 'make check' stalls on this test. Unless you are insane enough to run on FAT, or unlucky enough to be on mingw (since I didn't want to drag in a dependency on xnano