On Mon, 24 Feb 2025 at 11:25, Brendan Jackman <jackm...@google.com> wrote:
>
> On Fri, 21 Feb 2025 at 19:26, Brendan Jackman <jackm...@google.com> wrote:
> >
> > It seems that 9pfs does not allow truncating unlinked files, Mark Brown
> > has noted that NFS may also behave this way.
>
> I have not investigated at all but I _think_ over the weekend I saw
> ftruncate() failure on a QEMU guest where /tmp was tmpfs.
>
> Most likely explanation is user probably error (like /tmp wasn't
> actually tmpfs or the tmpfile() did not actually come from /tmp).

OK I double checked. It was in fact a 9p filesystem, turns out
virtme-ng uses that unconditionally for its --rwdir/--rodir mounts
even if the root is virtiofsd, and the tests operate on files in the
CWD as well as in /tmp.

I am still pondering ways to tackle this kinda problem more
systematically but for now I think just skipping these tests is fine.

> +               ksft_exit_skip("ftruncate(fileno(tmpfile())) gave ENOENT, 
> weird filesystem?");

This is missing a newline though, ditto in the subsequent patch. I
will wait and see if any reviews come in before I send a fixup.

Reply via email to