Skip to contentSkip to conversation

mkfs: print more info for debugging

PATCH New Li Wang 3 participants 7 messages Apr 20, 2021 – Apr 21, 2021

lore
Share & tools
lore

Li Wang

author
#0 lore raw

PATCH 1/1 mkfs: print more info for debugging

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.

---
 testcases/commands/mkfs/mkfs01.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
testcases/commands/mkfs/mkfs01.sh +4 -2
index 90368190d..55296c8df 100755
@@ -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
Signature · 1 line
2.30.2
#1 lore raw

PATCH 1/1 mkfs: print more info for debugging

Quoted 2 lines

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.

LGTM, just some remarks below

Quoted 16 lines

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.

---
 testcases/commands/mkfs/mkfs01.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
testcases/commands/mkfs/mkfs01.sh +0 -0
index 90368190d..55296c8df 100755

testcases/commands/mkfs/mkfs01.sh mkfs_test() · line 131

Quoted 5 lines
testcases/commands/mkfs/mkfs01.sh +1 -1
@@ -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).

testcases/commands/mkfs/mkfs01.sh mkfs_test() · line 140

Quoted 10 lines
testcases/commands/mkfs/mkfs01.sh +2 -1
+			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

Quoted 4 lines
testcases/commands/mkfs/mkfs01.sh +1 -0
+			cat temp
 			return
 		fi
 	fi
author
#2 lore raw

PATCH 1/1 mkfs: print more info for debugging

Quoted 11 lines

testcases/commands/mkfs/mkfs01.sh mkfs_test() · line 131

Quoted 8 lines
testcases/commands/mkfs/mkfs01.sh +1 -1
@@ -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.

Signature · 2 lines
Regards,
Li Wang
#3 lore raw

PATCH 1/1 mkfs: print more info for debugging

In reply to Li Wang

----- Original Message -----

Quoted 2 lines

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
Quoted 45 lines

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.

---
 testcases/commands/mkfs/mkfs01.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
testcases/commands/mkfs/mkfs01.sh +4 -3
index 90368190d..55296c8df 100755
@@ -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

author
#4 lore raw

PATCH 1/1 mkfs: print more info for debugging

Quoted 4 lines · Jan Stancek

----- Original Message -----

Quoted 8 lines
Quoted 2 lines

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?

Quoted 66 lines

/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
Quoted 45 lines

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.

---
 testcases/commands/mkfs/mkfs01.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
testcases/commands/mkfs/mkfs01.sh +4 -3
index 90368190d..55296c8df 100755
@@ -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

Signature · 2 lines
Regards,
Li Wang
#5 lore raw

PATCH 1/1 mkfs: print more info for debugging

----- Original Message -----

Quoted 11 lines · Jan Stancek
Quoted 10 lines

----- Original Message -----

Quoted 2 lines

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%:

Quoted 6 lines
Quoted 2 lines
# 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)

Quoted 1 line

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

Not immediately, I lost reservation of the machine.

Quoted 79 lines
Quoted 67 lines

/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
Quoted 43 lines

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.

---
 testcases/commands/mkfs/mkfs01.sh | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
testcases/commands/mkfs/mkfs01.sh +1 -1
index 90368190d..55296c8df 100755
@@ -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."

testcases/commands/mkfs/mkfs01.sh +2 -1
+                     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

Quoted 5 lines
Quoted 4 lines

--
Mailing list info: https://lists.linux.it/listinfo/ltp

--
Regards,
Li Wang

#6 lore raw

PATCH 1/1 mkfs: print more info for debugging

In reply to Li Wang

----- Original Message -----

Quoted 11 lines · Jan Stancek
Quoted 10 lines

----- Original Message -----

Quoted 2 lines

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%:

Quoted 7 lines
Quoted 2 lines
# 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