All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] mkfs: print more info for debugging
@ 2021-04-20  7:53 Li Wang
  2021-04-20  8:22 ` Petr Vorel
  2021-04-20 12:17 ` Jan Stancek
  0 siblings, 2 replies; 7+ messages in thread
From: Li Wang @ 2021-04-20  7:53 UTC (permalink / raw)
  To: ltp

We can NOT reproduce the problem by manual with both ppc64le and s390x,
so let's print more useful info from test when getting fail.

 mkfs01 1 TPASS: 'mkfs -t ext4  /dev/loop0 ' passed.
 mkfs01 2 TFAIL: 'mkfs -t ext4  /dev/loop0 16000' failed, not expected.
 mkfs01 3 TPASS: 'mkfs -t ext4 -c /dev/loop0 ' passed.
 mkfs01 4 TPASS: 'mkfs -V   ' passed.
 mkfs01 5 TPASS: 'mkfs -h   ' passed.

Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/commands/mkfs/mkfs01.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
index 90368190d..55296c8df 100755
--- a/testcases/commands/mkfs/mkfs01.sh
+++ b/testcases/commands/mkfs/mkfs01.sh
@@ -128,7 +128,8 @@ mkfs_test()
 	if [ -n "$device" ]; then
 		mkfs_verify_type "$fs_type" "$device"
 		if [ $? -ne 0 ]; then
-			tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
+			tst_res TFAIL "'${mkfs_cmd}' failed, not expected type."
+			cat temp
 			return
 		fi
 	fi
@@ -136,7 +137,8 @@ mkfs_test()
 	if [ -n "$size" ]; then
 		mkfs_verify_size "$fs_type" "$size"
 		if [ $? -ne 0 ]; then
-			tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
+			tst_res TFAIL "'${mkfs_cmd}' failed, not expected size."
+			cat temp
 			return
 		fi
 	fi
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [LTP] [PATCH] mkfs: print more info for debugging
  2021-04-20  7:53 [LTP] [PATCH] mkfs: print more info for debugging Li Wang
@ 2021-04-20  8:22 ` Petr Vorel
  2021-04-20  8:39   ` Li Wang
  2021-04-20 12:17 ` Jan Stancek
  1 sibling, 1 reply; 7+ messages in thread
From: Petr Vorel @ 2021-04-20  8:22 UTC (permalink / raw)
  To: ltp

> We can NOT reproduce the problem by manual with both ppc64le and s390x,
> so let's print more useful info from test when getting fail.

Reviewed-by: Petr Vorel <pvorel@suse.cz>

LGTM, just some remarks below

>  mkfs01 1 TPASS: 'mkfs -t ext4  /dev/loop0 ' passed.
>  mkfs01 2 TFAIL: 'mkfs -t ext4  /dev/loop0 16000' failed, not expected.
>  mkfs01 3 TPASS: 'mkfs -t ext4 -c /dev/loop0 ' passed.
>  mkfs01 4 TPASS: 'mkfs -V   ' passed.
>  mkfs01 5 TPASS: 'mkfs -h   ' passed.

> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
>  testcases/commands/mkfs/mkfs01.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)

> diff --git a/testcases/commands/mkfs/mkfs01.sh b/testcases/commands/mkfs/mkfs01.sh
> index 90368190d..55296c8df 100755
> --- a/testcases/commands/mkfs/mkfs01.sh
> +++ b/testcases/commands/mkfs/mkfs01.sh
> @@ -128,7 +128,8 @@ mkfs_test()
>  	if [ -n "$device" ]; then
>  		mkfs_verify_type "$fs_type" "$device"
>  		if [ $? -ne 0 ]; then
> -			tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> +			tst_res TFAIL "'${mkfs_cmd}' failed, not expected type."
Maybe "unexpected type"?

I'd also change ${mkfs_cmd} to $mkfs_cmd (more readable).

> +			cat temp
>  			return
>  		fi
>  	fi
> @@ -136,7 +137,8 @@ mkfs_test()
>  	if [ -n "$size" ]; then
>  		mkfs_verify_size "$fs_type" "$size"
>  		if [ $? -ne 0 ]; then
> -			tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> +			tst_res TFAIL "'${mkfs_cmd}' failed, not expected size."
The same here.

Kind regards,
Petr

> +			cat temp
>  			return
>  		fi
>  	fi

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] [PATCH] mkfs: print more info for debugging
  2021-04-20  8:22 ` Petr Vorel
@ 2021-04-20  8:39   ` Li Wang
  0 siblings, 0 replies; 7+ messages in thread
From: Li Wang @ 2021-04-20  8:39 UTC (permalink / raw)
  To: ltp

> > --- a/testcases/commands/mkfs/mkfs01.sh
> > +++ b/testcases/commands/mkfs/mkfs01.sh
> > @@ -128,7 +128,8 @@ mkfs_test()
> >       if [ -n "$device" ]; then
> >               mkfs_verify_type "$fs_type" "$device"
> >               if [ $? -ne 0 ]; then
> > -                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> > +                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected type."
> Maybe "unexpected type"?
>
> I'd also change ${mkfs_cmd} to $mkfs_cmd (more readable).

Sounds good, I modified it with your suggestions and pushed it.

-- 
Regards,
Li Wang


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] [PATCH] mkfs: print more info for debugging
  2021-04-20  7:53 [LTP] [PATCH] mkfs: print more info for debugging Li Wang
  2021-04-20  8:22 ` Petr Vorel
@ 2021-04-20 12:17 ` Jan Stancek
  2021-04-20 13:01   ` Li Wang
  1 sibling, 1 reply; 7+ messages in thread
From: Jan Stancek @ 2021-04-20 12:17 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> We can NOT reproduce the problem by manual with both ppc64le and s390x,
> so let's print more useful info from test when getting fail.

It's mkfs_verify_size, test expects to find 90% blocks (of device size),
but lately we miss that by ~1-2%:

# mkfs.ext3 /dev/loop0 16000
mke2fs 1.46.2 (28-Feb-2021)
/dev/loop0 contains a ext3 file system
        created on Fri Apr 16 05:09:23 2021
Proceed anyway? (y,N) y
Discarding device blocks: done
Creating filesystem with 16000 1k blocks and 4000 inodes
Filesystem UUID: d66c4c37-13ce-41df-b3c4-345ec1641e1f
Superblock backups stored on blocks:
        8193

Allocating group tables: done
Writing inode tables: done
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

 mount /dev/loop0  /mnt/test
# df -T
Filesystem                           Type      1K-blocks      Used  Available Use% Mounted on
/dev/loop0                           ext3          14343        19      13524   1% /mnt/test


> 
>  mkfs01 1 TPASS: 'mkfs -t ext4  /dev/loop0 ' passed.
>  mkfs01 2 TFAIL: 'mkfs -t ext4  /dev/loop0 16000' failed, not expected.
>  mkfs01 3 TPASS: 'mkfs -t ext4 -c /dev/loop0 ' passed.
>  mkfs01 4 TPASS: 'mkfs -V   ' passed.
>  mkfs01 5 TPASS: 'mkfs -h   ' passed.
> 
> Signed-off-by: Li Wang <liwang@redhat.com>
> ---
>  testcases/commands/mkfs/mkfs01.sh | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/testcases/commands/mkfs/mkfs01.sh
> b/testcases/commands/mkfs/mkfs01.sh
> index 90368190d..55296c8df 100755
> --- a/testcases/commands/mkfs/mkfs01.sh
> +++ b/testcases/commands/mkfs/mkfs01.sh
> @@ -128,7 +128,8 @@ mkfs_test()
>  	if [ -n "$device" ]; then
>  		mkfs_verify_type "$fs_type" "$device"
>  		if [ $? -ne 0 ]; then
> -			tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> +			tst_res TFAIL "'${mkfs_cmd}' failed, not expected type."
> +			cat temp
>  			return
>  		fi
>  	fi
> @@ -136,7 +137,8 @@ mkfs_test()
>  	if [ -n "$size" ]; then
>  		mkfs_verify_size "$fs_type" "$size"
>  		if [ $? -ne 0 ]; then
> -			tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> +			tst_res TFAIL "'${mkfs_cmd}' failed, not expected size."
> +			cat temp
>  			return
>  		fi
>  	fi
> --
> 2.30.2
> 
> 
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] [PATCH] mkfs: print more info for debugging
  2021-04-20 12:17 ` Jan Stancek
@ 2021-04-20 13:01   ` Li Wang
  2021-04-20 13:09     ` Jan Stancek
  2021-04-21 10:46     ` Jan Stancek
  0 siblings, 2 replies; 7+ messages in thread
From: Li Wang @ 2021-04-20 13:01 UTC (permalink / raw)
  To: ltp

On Tue, Apr 20, 2021 at 8:17 PM Jan Stancek <jstancek@redhat.com> wrote:
>
>
>
> ----- Original Message -----
> > We can NOT reproduce the problem by manual with both ppc64le and s390x,
> > so let's print more useful info from test when getting fail.
>
> It's mkfs_verify_size, test expects to find 90% blocks (of device size),
> but lately we miss that by ~1-2%:
>
> # mkfs.ext3 /dev/loop0 16000
> mke2fs 1.46.2 (28-Feb-2021)

Thanks for the info.

How reproducible of this issue, and which arch/platform you used?
Or, can you reproduce it with a downgrade e2fsprogs version?


> /dev/loop0 contains a ext3 file system
>         created on Fri Apr 16 05:09:23 2021
> Proceed anyway? (y,N) y
> Discarding device blocks: done
> Creating filesystem with 16000 1k blocks and 4000 inodes
> Filesystem UUID: d66c4c37-13ce-41df-b3c4-345ec1641e1f
> Superblock backups stored on blocks:
>         8193
>
> Allocating group tables: done
> Writing inode tables: done
> Creating journal (1024 blocks): done
> Writing superblocks and filesystem accounting information: done
>
>  mount /dev/loop0  /mnt/test
> # df -T
> Filesystem                           Type      1K-blocks      Used  Available Use% Mounted on
> /dev/loop0                           ext3          14343        19      13524   1% /mnt/test
>
>
> >
> >  mkfs01 1 TPASS: 'mkfs -t ext4  /dev/loop0 ' passed.
> >  mkfs01 2 TFAIL: 'mkfs -t ext4  /dev/loop0 16000' failed, not expected.
> >  mkfs01 3 TPASS: 'mkfs -t ext4 -c /dev/loop0 ' passed.
> >  mkfs01 4 TPASS: 'mkfs -V   ' passed.
> >  mkfs01 5 TPASS: 'mkfs -h   ' passed.
> >
> > Signed-off-by: Li Wang <liwang@redhat.com>
> > ---
> >  testcases/commands/mkfs/mkfs01.sh | 6 ++++--
> >  1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/testcases/commands/mkfs/mkfs01.sh
> > b/testcases/commands/mkfs/mkfs01.sh
> > index 90368190d..55296c8df 100755
> > --- a/testcases/commands/mkfs/mkfs01.sh
> > +++ b/testcases/commands/mkfs/mkfs01.sh
> > @@ -128,7 +128,8 @@ mkfs_test()
> >       if [ -n "$device" ]; then
> >               mkfs_verify_type "$fs_type" "$device"
> >               if [ $? -ne 0 ]; then
> > -                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> > +                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected type."
> > +                     cat temp
> >                       return
> >               fi
> >       fi
> > @@ -136,7 +137,8 @@ mkfs_test()
> >       if [ -n "$size" ]; then
> >               mkfs_verify_size "$fs_type" "$size"
> >               if [ $? -ne 0 ]; then
> > -                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> > +                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected size."
> > +                     cat temp
> >                       return
> >               fi
> >       fi
> > --
> > 2.30.2
> >
> >
> > --
> > Mailing list info: https://lists.linux.it/listinfo/ltp
> >
> >
>


-- 
Regards,
Li Wang


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] [PATCH] mkfs: print more info for debugging
  2021-04-20 13:01   ` Li Wang
@ 2021-04-20 13:09     ` Jan Stancek
  2021-04-21 10:46     ` Jan Stancek
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Stancek @ 2021-04-20 13:09 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> On Tue, Apr 20, 2021 at 8:17 PM Jan Stancek <jstancek@redhat.com> wrote:
> >
> >
> >
> > ----- Original Message -----
> > > We can NOT reproduce the problem by manual with both ppc64le and s390x,
> > > so let's print more useful info from test when getting fail.
> >
> > It's mkfs_verify_size, test expects to find 90% blocks (of device size),
> > but lately we miss that by ~1-2%:
> >
> > # mkfs.ext3 /dev/loop0 16000
> > mke2fs 1.46.2 (28-Feb-2021)
> 
> Thanks for the info.
> 
> How reproducible of this issue, and which arch/platform you used?

It seemed pretty consistent with Fedora-Rawhide-20210415.n.0 on power9 ppc64le (9006-22P, J:5279637)

> Or, can you reproduce it with a downgrade e2fsprogs version?

Not immediately, I lost reservation of the machine.

> 
> 
> > /dev/loop0 contains a ext3 file system
> >         created on Fri Apr 16 05:09:23 2021
> > Proceed anyway? (y,N) y
> > Discarding device blocks: done
> > Creating filesystem with 16000 1k blocks and 4000 inodes
> > Filesystem UUID: d66c4c37-13ce-41df-b3c4-345ec1641e1f
> > Superblock backups stored on blocks:
> >         8193
> >
> > Allocating group tables: done
> > Writing inode tables: done
> > Creating journal (1024 blocks): done
> > Writing superblocks and filesystem accounting information: done
> >
> >  mount /dev/loop0  /mnt/test
> > # df -T
> > Filesystem                           Type      1K-blocks      Used
> > Available Use% Mounted on
> > /dev/loop0                           ext3          14343        19
> > 13524   1% /mnt/test
> >
> >
> > >
> > >  mkfs01 1 TPASS: 'mkfs -t ext4  /dev/loop0 ' passed.
> > >  mkfs01 2 TFAIL: 'mkfs -t ext4  /dev/loop0 16000' failed, not expected.
> > >  mkfs01 3 TPASS: 'mkfs -t ext4 -c /dev/loop0 ' passed.
> > >  mkfs01 4 TPASS: 'mkfs -V   ' passed.
> > >  mkfs01 5 TPASS: 'mkfs -h   ' passed.
> > >
> > > Signed-off-by: Li Wang <liwang@redhat.com>
> > > ---
> > >  testcases/commands/mkfs/mkfs01.sh | 6 ++++--
> > >  1 file changed, 4 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/testcases/commands/mkfs/mkfs01.sh
> > > b/testcases/commands/mkfs/mkfs01.sh
> > > index 90368190d..55296c8df 100755
> > > --- a/testcases/commands/mkfs/mkfs01.sh
> > > +++ b/testcases/commands/mkfs/mkfs01.sh
> > > @@ -128,7 +128,8 @@ mkfs_test()
> > >       if [ -n "$device" ]; then
> > >               mkfs_verify_type "$fs_type" "$device"
> > >               if [ $? -ne 0 ]; then
> > > -                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> > > +                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected
> > > type."
> > > +                     cat temp
> > >                       return
> > >               fi
> > >       fi
> > > @@ -136,7 +137,8 @@ mkfs_test()
> > >       if [ -n "$size" ]; then
> > >               mkfs_verify_size "$fs_type" "$size"
> > >               if [ $? -ne 0 ]; then
> > > -                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected."
> > > +                     tst_res TFAIL "'${mkfs_cmd}' failed, not expected
> > > size."
> > > +                     cat temp
> > >                       return
> > >               fi
> > >       fi
> > > --
> > > 2.30.2
> > >
> > >
> > > --
> > > Mailing list info: https://lists.linux.it/listinfo/ltp
> > >
> > >
> >
> 
> 
> --
> Regards,
> Li Wang
> 
> 


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [LTP] [PATCH] mkfs: print more info for debugging
  2021-04-20 13:01   ` Li Wang
  2021-04-20 13:09     ` Jan Stancek
@ 2021-04-21 10:46     ` Jan Stancek
  1 sibling, 0 replies; 7+ messages in thread
From: Jan Stancek @ 2021-04-21 10:46 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> On Tue, Apr 20, 2021 at 8:17 PM Jan Stancek <jstancek@redhat.com> wrote:
> >
> >
> >
> > ----- Original Message -----
> > > We can NOT reproduce the problem by manual with both ppc64le and s390x,
> > > so let's print more useful info from test when getting fail.
> >
> > It's mkfs_verify_size, test expects to find 90% blocks (of device size),
> > but lately we miss that by ~1-2%:
> >
> > # mkfs.ext3 /dev/loop0 16000
> > mke2fs 1.46.2 (28-Feb-2021)
> 
> Thanks for the info.
> 
> How reproducible of this issue, and which arch/platform you used?
> Or, can you reproduce it with a downgrade e2fsprogs version?

It starts with this commit:
  https://github.com/tytso/e2fsprogs/commit/59037c5357d39c6d0f14a0aff70e67dc13eafc84


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-04-21 10:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-20  7:53 [LTP] [PATCH] mkfs: print more info for debugging Li Wang
2021-04-20  8:22 ` Petr Vorel
2021-04-20  8:39   ` Li Wang
2021-04-20 12:17 ` Jan Stancek
2021-04-20 13:01   ` Li Wang
2021-04-20 13:09     ` Jan Stancek
2021-04-21 10:46     ` Jan Stancek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.