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

Re: [PATCH] reftable: fix tests being broken by NFS' delete-after-close semantics

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 21, 2024, 17:35 UTC
Message-ID
<xmqqsf0j8p48.fsf@gitster.g>
In-Reply-To
<8ac5e94a3930cdd2aee9ea86acda3155674b635c.1711035529.git.ps@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
Show 14 quoted lines
>  	while ((d = readdir(dir))) {
> -		if (!strcmp(d->d_name, "..") || !strcmp(d->d_name, "."))
> +		/*
> +		 * Besides skipping over "." and "..", we also need to
> +		 * skip over other files that have a leading ".". This
> +		 * is due to behaviour of NFS, which will rename files
> +		 * to ".nfs*" to emulate delete-on-last-close.
> +		 *
> +		 * In any case this should be fine as the reftable
> +		 * library will never write files with leading dots
> +		 * anyway.
> +		 */
> +		if (starts_with(d->d_name, "."))
>  			continue;

Sounds good. We should count what we positively consider what we wrote, not random cruft somebody else might have dropped in the directory, and this is a good first thing to do.

Will queue.  Thanks.
Previous: Patrick SteinhardtNext: Toon Claes
Message 9 of 10 in “t0032 fails on NFS mounts”
  1. Chuck LeverMar 12, 2024
  2. rsbecker@nexbridge.comMar 12, 2024
  3. Patrick SteinhardtMar 21, 2024
  4. Jeff KingMar 13, 2024
  5. Patrick SteinhardtMar 15, 2024
  6. Junio C HamanoMar 15, 2024
  7. Patrick SteinhardtMar 21, 2024
  8. reftable: fix tests being broken by NFS' delete-after-close semanticsPatrick Steinhardt, Mar 21, 2024
  9. Junio C HamanoMar 21, 2024
  10. Toon ClaesMar 22, 2024

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.