FS/XFS testing framework
 help / color / mirror / Atom feed
From: Eric Biggers <ebiggers@kernel.org>
To: Pavel Reichl <preichl@redhat.com>
Cc: fstests@vger.kernel.org
Subject: Re: [PATCH 1/4] common: Fix file leak in _get_max_file_size
Date: Thu, 22 Sep 2022 20:31:23 -0700	[thread overview]
Message-ID: <Yy0oizGOSvd6Z2Yu@sol.localdomain> (raw)
In-Reply-To: <20220922134822.1020119-1-preichl@redhat.com>

On Thu, Sep 22, 2022 at 03:48:19PM +0200, Pavel Reichl wrote:
> This is obviously mostly problematic for FS lacking support for sparse
> files.
> 
> Signed-off-by: Pavel Reichl <preichl@redhat.com>
> ---
>  common/rc         | 1 +
>  tests/generic/692 | 0
>  2 files changed, 1 insertion(+)
>  mode change 100644 => 100755 tests/generic/692
> 
> diff --git a/common/rc b/common/rc
> index 228fcb37..c9078649 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4637,6 +4637,7 @@ _get_max_file_size()
>  			l=$m
>  		fi
>  	done
> +	rm -f $testfile
>  	echo $l
>  }

Removing the file is fine, but I didn't have filesystems that lack support for
sparse files in mind when I wrote this function.  Maybe it should look at $FSTYP
first, and only use the generic algorithm as a fallback for unhandled types?

- Eric

  parent reply	other threads:[~2022-09-23  3:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 13:48 [PATCH 1/4] common: Fix file leak in _get_max_file_size Pavel Reichl
2022-09-22 13:48 ` [PATCH 2/4] g/299: speed up the test Pavel Reichl
2022-09-22 15:16   ` Zorro Lang
2022-09-22 13:48 ` [PATCH 3/4] generic: cleanup test files Pavel Reichl
2022-09-22 14:36   ` Zorro Lang
     [not found]     ` <91ec6d59-5014-2e3e-8e80-aac162b8ffc1@redhat.com>
2022-09-22 15:08       ` Zorro Lang
2022-09-22 17:05     ` Pavel Reichl
2022-09-22 17:58       ` Zorro Lang
2022-09-22 13:48 ` [PATCH 4/4] g/394: clean up " Pavel Reichl
2022-09-22 15:04   ` Zorro Lang
2022-09-22 14:46 ` [PATCH 1/4] common: Fix file leak in _get_max_file_size Zorro Lang
2022-09-22 14:51   ` Pavel Reichl
2022-09-23  3:31 ` Eric Biggers [this message]
2022-09-23  5:04   ` Zorro Lang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Yy0oizGOSvd6Z2Yu@sol.localdomain \
    --to=ebiggers@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=preichl@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox