Such files are left by an NFS server for open but deleted files and will
thus mess up ccache's "files in cache" counter if not ignored.
goto out;
}
+ if (strncmp(p, ".nfs", 4) == 0) {
+ /* Ignore temporary NFS files that may be left for open but deleted files. */
+ goto out;
+ }
+
if (strstr(p, ".tmp.") != NULL) {
/* delete any tmp files older than 1 hour */
if (st->st_mtime + 3600 < time(NULL)) {
test_failed "$CCACHE_DIR/a/abcd.tmp.unknown not removed"
fi
checkstat 'files in cache' 0
+
+ testname="ignore .nfs* files"
+ prepare_cleanup_test $CCACHE_DIR/a
+ touch $CCACHE_DIR/a/.nfs0123456789
+ $CCACHE -F 0 -M 0 >/dev/null
+ $CCACHE -c >/dev/null
+ checkfilecount 1 '.nfs*' $CCACHE_DIR
+ checkstat 'files in cache' 30
}
######################################################################