annotate modules/userspec @ 17388:3c592b4deb04

utimensat-tests, etc.: try to fix some races Problem reported by Bernhard Voelker in <http://lists.gnu.org/archive/html/bug-gnulib/2013-04/msg00071.html>. I don't know whether this patch fixes that race condition, but it fixes *some* race conditions, so it should be a win. * modules/chown-tests (Depends-on): * modules/fchownat-tests (Depends-on): * modules/fdutimensat-tests (Depends-on): * modules/futimens-tests (Depends-on): * modules/lchown-tests (Depends-on): * modules/stat-time-tests (Depends-on): * modules/utimens-tests (Depends-on): * modules/utimensat-tests (Depends-on): Depend on nanosleep, not usleep. * modules/chown-tests (test_chown_LDADD): * modules/lchown-tests (test_lchown_LDADD): * modules/stat-time-tests (test_stat_time_LDADD): New macro. * modules/fchownat-tests (test_fchownat_LDADD): * modules/fdutimensat-tests (test_fdutimensat_LDADD): * modules/futimens-tests (test_futimens_LDADD): * modules/utimens-tests (test_utimens_LDADD): * modules/utimensat-tests (test_utimensat_LDADD): Add $(LIB_NANOSLEEP). * modules/stat-time-tests (Files): Add tests/nap.h. * tests/nap.h: Include <limits.h>, for INT_MAX. (lt_mtime): Remove. (diff_timespec): New function. (get_stat): Rename from get_mtime. All callers changed. (nap_works): Determine the needed delay by inspecting the file system's timestamp jumps; this should be more reliable. Look at both mtime and ctime, and take the maximum of the two jumps. (nap_works, guess_delay): Return a nanosecond cound, not a microsecond count. All callers changed. (nap_works, nap): Use nanosleep, not usleep. Check for nanosleep failure. (nap): Multiply the guess by 1.125, to accommodate the case where the file system's clock is a bit slower than nanosleep's clock. * tests/test-stat-time.c (BASE): New macro. Include nap.h. (nap): Remove; nap.h now defines this. This removes a duplicate implementation of 'nap'.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 30 Apr 2013 23:14:19 -0700
parents 18a38c9615f0
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 Description:
16235
18a38c9615f0 In commentary, do not use ` to quote.
Paul Eggert <eggert@cs.ucla.edu>
parents: 15252
diff changeset
2 Parse a 'user:group' specifier (e.g. the first argument of chown utility).
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4 Files:
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 lib/userspec.c
5085
2394c3c49c94 Add some missing dependencies and/or files.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4843
diff changeset
6 lib/userspec.h
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 m4/userspec.m4
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9 Depends-on:
4560
ff249a314eac Accept `.' as a separator only in pre-POSIX-200112 mode.
Paul Eggert <eggert@cs.ucla.edu>
parents: 4197
diff changeset
10 posixver
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 xalloc
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 xstrtol
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 strdup
5965
cd3c62f1332e Support programs like Emacs that use gnulib but not gettext.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5820
diff changeset
14 gettext-h
6657
25df81cf2f51 * modules/intprops: New file.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5965
diff changeset
15 intprops
12374
5a0b2165f31b userspec: depend on the inttostr module, too
Jim Meyering <meyering@redhat.com>
parents: 7497
diff changeset
16 inttostr
5820
aec0a1f23054 (Depends-on): Add stdbool.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5750
diff changeset
17 stdbool
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 configure.ac:
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 gl_USERSPEC
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 Makefile.am:
15252
085433472964 userspec: Move AC_LIBOBJ invocations to module description.
Bruno Haible <bruno@clisp.org>
parents: 13817
diff changeset
23 lib_SOURCES += userspec.c
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 Include:
4843
aa6faf3bbe11 (lib_SOURCES): Add userspec.h.
Jim Meyering <jim@meyering.net>
parents: 4560
diff changeset
26 "userspec.h"
4110
632b6cf5063f Module description.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27
5251
42b53a22aee5 Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents: 5209
diff changeset
28 License:
42b53a22aee5 Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents: 5209
diff changeset
29 GPL
42b53a22aee5 Add a license tag to every module.
Bruno Haible <bruno@clisp.org>
parents: 5209
diff changeset
30
4197
3ccc6d0d52bb Add a Maintainer.
Bruno Haible <bruno@clisp.org>
parents: 4172
diff changeset
31 Maintainer:
3ccc6d0d52bb Add a Maintainer.
Bruno Haible <bruno@clisp.org>
parents: 4172
diff changeset
32 Jim Meyering