git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: not all tests pass when on an NFS partition

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 12, 2009, 21:20 UTC
Message-ID
<7vk57vjqsd.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<3a69fa7c0902121220n4ea2f19di6fe984dd2002772@mail.gmail.com>
E R <pc88mxer@gmail.com> writes:
> When I run 'make test' for git-1.6.1.3 it will fail on this test when
> running on an NFS partition.
... when the filesystem clock and the machine clock are out of sync.
> Is this a known problem? Is this a real problem?
It's a problem whose cause can be easily guessed ;-)

The tests check if the default expiration period (14 days) are honored by creating unreferenced objects that are slightly older and slightly newer than the cut-off timestamp and running the gc. I suspect that the issue with network filesystems whose clock are not grossly skewed can easily be worked around by tweaking these -30 and +1 constants to larger (but not too large to make the tests meaningless) values.

Show 24 quoted lines
> My uname -a: Linux XXX 2.6.18-92.1.17.el5 #1 SMP Tue Nov 4 13:45:01
> EST 2008 i686 athlon i386 GNU/Linux
>
>
> *** t5304-prune.sh ***
> *   ok 1: setup
> *   ok 2: prune stale packs
> *   ok 3: prune --expire
> * FAIL 4: gc: implicit prune --expire
>
>
>                 before=$(git count-objects | sed "s/ .*//") &&
>                 BLOB=$(echo aleph_0 | git hash-object -w --stdin) &&
>                 BLOB_FILE=.git/objects/$(echo $BLOB | sed "s/^../&\//") &&
>                 test $((1 + $before)) = $(git count-objects | sed "s/ .*//") &&
>                 test -f $BLOB_FILE &&
>                 test-chmtime =-$((86400*14-30)) $BLOB_FILE &&
>                 git gc &&
>                 test $((1 + $before)) = $(git count-objects | sed "s/ .*//") &&
>                 test -f $BLOB_FILE &&
>                 test-chmtime =-$((86400*14+1)) $BLOB_FILE &&
>                 git gc &&
>                 test $before = $(git count-objects | sed "s/ .*//") &&
>                 ! test -f $BLOB_FILE
Previous: E RNext: Brandon Casey
Message 2 of 7 in “not all tests pass when on an NFS partition”
  1. E RFeb 12, 2009
  2. Junio C HamanoFeb 12, 2009
  3. Brandon CaseyFeb 13, 2009
  4. E RFeb 15, 2009
  5. E RFeb 17, 2009
  6. Brandon CaseyFeb 17, 2009
  7. Brandon CaseyFeb 17, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.