diff mbox series

[2/3] common: remove the $FSYP check in _cleanup_dump

Message ID 20250128071315.676272-3-hch@lst.de (mailing list archive)
State New
Headers show
Series [1/3] generic/363: remove _supported_fs xfs | expand

Commit Message

Christoph Hellwig Jan. 28, 2025, 7:12 a.m. UTC
Despite the comment, _cleanup_dump is only called from xfs specific
tests, so this is superfluous.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 common/dump | 6 ------
 1 file changed, 6 deletions(-)

Comments

Darrick J. Wong Jan. 28, 2025, 7:14 p.m. UTC | #1
On Tue, Jan 28, 2025 at 08:12:59AM +0100, Christoph Hellwig wrote:
> Despite the comment, _cleanup_dump is only called from xfs specific
> tests, so this is superfluous.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

This patch looks ok, but I have a few extra[neous] comments...
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

> ---
>  common/dump | 6 ------
>  1 file changed, 6 deletions(-)
> 
> diff --git a/common/dump b/common/dump
> index 50b2ba03c670..3761c16100d8 100644
> --- a/common/dump
> +++ b/common/dump
> @@ -223,12 +223,6 @@ _require_tape()
>  #
>  _cleanup_dump()
>  {
> -    # Some tests include this before checking _supported_fs xfs
> -    # and the sleeps & checks here get annoying
> -    if [ "$FSTYP" != "xfs" ]; then
> -       return
> -    fi
> -

I went looking in common/dump and I noticed the lack of an explicit
setup routine.  Instead, variables and _require calls are done when
sourcing the file.  Curiously there's no check for FSTYP==xfs, which I
guess is reasonable for sourced stuff, but I think that should all get
pulled up into _init_dump() or something.

The other thing I noticed is that sourcing common/dump deletes
$seqres.full, which seems like a real bug.

--D

>      cd $here
>  
>      if [ -n "$DEBUGDUMP" ]; then
> -- 
> 2.45.2
> 
>
Christoph Hellwig Jan. 29, 2025, 5:27 a.m. UTC | #2
On Tue, Jan 28, 2025 at 11:14:42AM -0800, Darrick J. Wong wrote:
> I went looking in common/dump and I noticed the lack of an explicit
> setup routine.  Instead, variables and _require calls are done when
> sourcing the file.  Curiously there's no check for FSTYP==xfs, which I
> guess is reasonable for sourced stuff, but I think that should all get
> pulled up into _init_dump() or something.
> 
> The other thing I noticed is that sourcing common/dump deletes
> $seqres.full, which seems like a real bug.

Yeah, dump testing is at least as messy as xfsdump itself :)

Btw, did someone every spend some time analyzing why xfs/059 xfs/060
fail relatively frequently when using RT devices?  This is one of the
thing on my TODO list when I find a little more time..
diff mbox series

Patch

diff --git a/common/dump b/common/dump
index 50b2ba03c670..3761c16100d8 100644
--- a/common/dump
+++ b/common/dump
@@ -223,12 +223,6 @@  _require_tape()
 #
 _cleanup_dump()
 {
-    # Some tests include this before checking _supported_fs xfs
-    # and the sleeps & checks here get annoying
-    if [ "$FSTYP" != "xfs" ]; then
-       return
-    fi
-
     cd $here
 
     if [ -n "$DEBUGDUMP" ]; then