Skip to contentSkip to conversation

More test fixes/improvements

PATCH In review Glenn Washburn 3 participants 14 messages Sep 17, 2021 – Oct 7, 2021

lore
Share & tools
lore
#1 lore raw

PATCH 1/10 tests: Rename variable filtime -> filetime as its meant to be

In reply to Glenn Washburn
---
 tests/util/grub-fs-tester.in | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
tests/util/grub-fs-tester.in +4 -4
index 7c22cf882..9f6f26f26 100644
@@ -1170,8 +1170,8 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 	    fi
 
 	    if [ x$NOFILETIME != xy ]; then
-		filtime=$(TZ=UTC ls --time-style=+%Y%m%d%H%M%S -l -d "$MNTPOINTRO/$OSDIR/$BASEFILE"|awk '{print $6; }')
-		if echo "$LSROUT" | grep -F "$filtime $BASEFILE" > /dev/null; then
+		filetime=$(TZ=UTC ls --time-style=+%Y%m%d%H%M%S -l -d "$MNTPOINTRO/$OSDIR/$BASEFILE"|awk '{print $6; }')
+		if echo "$LSROUT" | grep -F "$filetime $BASEFILE" > /dev/null; then
 		    :
 		else
 		    echo TIME FAIL
@@ -1180,8 +1180,8 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    exit 1
 		fi
 
-		filtime=$(TZ=UTC ls --time-style=+%Y%m%d%H%M%S -l -d "$MNTPOINTRO/$OSDIR/$LONGNAME"|awk '{print $6; }')
-		if echo "$LSROUT" | grep -F "$filtime $LONGNAME" > /dev/null; then
+		filetime=$(TZ=UTC ls --time-style=+%Y%m%d%H%M%S -l -d "$MNTPOINTRO/$OSDIR/$LONGNAME"|awk '{print $6; }')
+		if echo "$LSROUT" | grep -F "$filetime $LONGNAME" > /dev/null; then
 		    :
 		else
 		    echo LONG TIME FAIL
Signature · 1 line
2.32.0
#0 lore raw

cover More test fixes/improvements

Here is another patch series of changes needed to get the make check tests passing on fairly recent Ubuntu/Debian systems, though most of the fixes are for issues on fairly old systems as well (eg. reiser fixes). The FAT volume label change is only needed on fairly recent systems because up until very recently a fairly old version of dosfstools has been used which didn't do invalid character checking.

Glenn

Glenn Washburn (10):
tests: Rename variable filtime -> filetime as its meant to be
tests: mkreiserfs only supports 4096 block size
tests: Disable reiserfs tests for old format because newer kernels do
not support them
tests: mkfs.btrfs now supports only 4k sector sizes and above
tests: Only test minix3 volumes of 1k block size
tests: Change FAT volume label to be with in the valid character range
tests: Skip hfs test only when mac_roman module is not loaded and not
loadable
grub-shell: Boot PowerPC using PMU instead of CUDA for power
management
tests: Output list of devices when partmap fails
tests: Do not delete filesystem images on error

 tests/hfs_test.in            |  2 +-
 tests/minixfs_test.in        |  5 -----
 tests/partmap_test.in        |  2 +-
 tests/reiserfs_test.in       |  4 +++-
 tests/util/grub-fs-tester.in | 28 ++++++++++++++--------------
 tests/util/grub-shell.in     |  1 +
 6 files changed, 20 insertions(+), 22 deletions(-)
Signature · 1 line
2.32.0
#2 lore raw

PATCH 2/10 tests: mkreiserfs only supports 4096 block size

---
 tests/util/grub-fs-tester.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tests/util/grub-fs-tester.in +4 -2
index 9f6f26f26..ab58a96c8 100644
@@ -126,8 +126,10 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 	    MAXBLKSIZE=4096
 	    ;;
 	xreiserfs*)
-	    MINBLKSIZE=512
-		# OS LIMITATION: 8192 isn't supported.
+	    # OS LIMITATION: mkreiserfs says block sizes smaller than 4k are
+	    # not supported and bails. Its been this way since at least 2014.
+	    MINBLKSIZE=4096
+	    # OS LIMITATION: 8192 isn't supported.
 	    MAXBLKSIZE=4096
 	    ;;
 	x"mdraid"*)
Signature · 1 line
2.32.0
#4 lore raw

PATCH 4/10 tests: mkfs.btrfs now supports only 4k sector sizes and above

In reply to Glenn Washburn
---
 tests/util/grub-fs-tester.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/util/grub-fs-tester.in +1 -1
index ab58a96c8..f4d9f161b 100644
@@ -59,7 +59,7 @@ case x"$fs" in
 	MINLOGSECSIZE=8
 	MAXLOGSECSIZE=12;;
     xbtrfs*)
-	MINLOGSECSIZE=8
+	MINLOGSECSIZE=12
 	    #  OS LIMITATION: It could go up to 32768 but Linux rejects sector sizes > 4096
 	MAXLOGSECSIZE=12;;
     xxfs)
Signature · 1 line
2.32.0
#3 lore raw

PATCH 3/10 tests: Disable reiserfs tests for old format because newer kernels do not support them

In reply to Glenn Washburn
---
 tests/reiserfs_test.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
tests/reiserfs_test.in +3 -1
index b5fed7635..ff703b203 100644
@@ -16,5 +16,7 @@ if ! which mkfs.reiserfs >/dev/null 2>&1; then
 fi
 
 "@builddir@/grub-fs-tester" reiserfs
-"@builddir@/grub-fs-tester" reiserfs_old
+
+# Kernels since at least 4.15 can not mount reiser filesystems of the old format
+#"@builddir@/grub-fs-tester" reiserfs_old
 
Signature · 1 line
2.32.0
#5 lore raw

PATCH 5/10 tests: Only test minix3 volumes of 1k block size

In reply to Glenn Washburn

Apparently there used to be a -B option for mkfs.minix to create a volume with a specified block size. This version is hard to come by and does not appear to be available in debian distributions. So remove support for testing a variety of blocks sizes for minix3. This allows the minix tests to run because they were being skipped due to not finding a mkfs.minix with the -B option.

---
 tests/minixfs_test.in        | 5 -----
 tests/util/grub-fs-tester.in | 4 ++--
 2 files changed, 2 insertions(+), 7 deletions(-)
tests/minixfs_test.in +0 -5
index 3b16a4de0..437d92df6 100644
@@ -25,11 +25,6 @@ if ! mkfs.minix -h | grep -- -3 > /dev/null; then
    exit 77
 fi
 
-if ! mkfs.minix -h | grep -- -B > /dev/null; then
-    echo "mkfs.minix doesn't support variable block size; cannot test minix*fs."
-   exit 77
-fi
-
 "@builddir@/grub-fs-tester" minix
 "@builddir@/grub-fs-tester" minix2
 "@builddir@/grub-fs-tester" minix3
tests/util/grub-fs-tester.in +2 -2
index f4d9f161b..96b204590 100644
@@ -201,7 +201,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		# OS LIMITATION: Linux rejects non-power-of-two blocks.
 		# OS LIMITATION: Linux rejects > 4096.
 	    MINBLKSIZE=1024
-	    MAXBLKSIZE=4096;;
+	    MAXBLKSIZE=1024;;
     esac
     if test "$BLKSTEP" -eq 0; then
 	blksizes="$(powrange "$MINBLKSIZE" "$MAXBLKSIZE")"
@@ -697,7 +697,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 		    "mkfs.minix" -v "${MOUNTDEVICE}"
 		    MOUNTFS="minix";;
 		x"minix3")
-		    "mkfs.minix" -B $BLKSIZE -3 "${MOUNTDEVICE}"
+		    "mkfs.minix" -3 "${MOUNTDEVICE}"
 		    MOUNTFS="minix";;
 		x"ntfs"*)
 		    "mkfs.ntfs" -s "$SECSIZE" -c "$BLKSIZE" -L "$FSLABEL" -Q -q "${MOUNTDEVICE}"
Signature · 1 line
2.32.0
#6 lore raw

PATCH 6/10 tests: Change FAT volume label to be with in the valid character range

In reply to Glenn Washburn

The ';', semi-colon, character is not a valid character for a FAT filesystem label. This test used to succeed because prior to v4.2 of dosfstools mkfs.vfat did not enforce the character restrictions for volume labels. So change the volume label string to be valid but contain symbol characters to test odd volume labels.

---
 tests/util/grub-fs-tester.in | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
tests/util/grub-fs-tester.in +3 -2
index 96b204590..537cdd48b 100644
@@ -343,9 +343,10 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 	    # FS LIMITATION: XFS label is at most 12 UTF-8 characters
 		x"xfs"|x"xfs_crc")
 		    FSLABEL="géт 😁к";;
-            # FS LIMITATION: FAT labels limited to 11 characters, no  international characters or lowercase
+            # FS LIMITATION: FAT labels limited to 11 characters, no international characters or lowercase
+	    # and excluding the restricted characters in "*?.,;:/\|+=<>[]"
 		x"vfat"* | xmsdos*)
-		    FSLABEL="GRUBTEST ;_";;
+		    FSLABEL="G~!@#\$%^&(_";;
 	    # FS LIMITATION: AFFS is latin1. At most 29 characters
 		x"affs" | xaffs_intl)
 		    FSLABEL="grub_tt? #*w;/e£@¡¤½¾{[]}<>.,";;
Signature · 1 line
2.32.0
#7 lore raw

PATCH 7/10 tests: Skip hfs test only when mac_roman module is not loaded and not loadable

In reply to Glenn Washburn

Allow the hfs tests to not be skipped if the mac_roman modules is loaded in the kernel, but not accessible to modprobe.

---
 tests/hfs_test.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/hfs_test.in +1 -1
index d7ec56bef..5b0c5e33e 100644
@@ -15,7 +15,7 @@ if ! which mkfs.hfs >/dev/null 2>&1; then
    exit 77
 fi
 
-if ! modprobe mac-roman; then
+if ! grep -q mac_roman /proc/modules && ! modprobe mac_roman; then
    echo "no mac-roman support; cannot test HFS."
    exit 77
 fi
Signature · 1 line
2.32.0
#8 lore raw

PATCH 8/10 grub-shell: Boot PowerPC using PMU instead of CUDA for power management

In reply to Glenn Washburn

At some point it looks like the defualt machine for qemu-system-ppc started using CUDA as a backend for power management. This causes the machine to throw an exception and not actually power down the VM[1]. Switching to PMU allows power downs and reboots to work as expceted.

[1] https://gitlab.com/qemu-project/qemu/-/issues/624

---
 tests/util/grub-shell.in | 1 +
 1 file changed, 1 insertion(+)
tests/util/grub-shell.in +1 -0
index 93e9f5148..5354d8678 100644
@@ -84,6 +84,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
 	serial_null="-serial null"
 	netbootext=elf
 	trim=1
+	qemuopts="-M mac99,via=pmu $qemuopts"
 	;;
 
     sparc64-ieee1275)
Signature · 1 line
2.32.0
#11 lore raw

PATCH 9/10 tests: Output list of devices when partmap fails

In reply to Glenn Washburn
---
 tests/partmap_test.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tests/partmap_test.in +1 -1
index faace51ec..3d9871a2f 100644
@@ -43,7 +43,7 @@ check_output () {
     for dsk in $@; do
 	if ! grep "($dsk)" "${outfile}" >/dev/null
 	then
-	    echo "($dsk): disk/partiton not found"
+	    echo "($dsk): disk/partiton not found in: $(cat "${outfile}")"
 	    exit 1
 	fi
     done
Signature · 1 line
2.32.0
#12 lore raw

PATCH 10/10 tests: Do not delete filesystem images on error

In reply to Glenn Washburn

The filesystem images created for the filesystem test can be useful when debugging why a filesystem test failed. So keep them around and let the user clean them up.

---
 tests/util/grub-fs-tester.in | 3 ---
 1 file changed, 3 deletions(-)
tests/util/grub-fs-tester.in +0 -3
index 537cdd48b..62f814dc4 100644
@@ -932,9 +932,6 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
 				sleep 1
 			    done
 			done
-			for i in $(range 0 $((NDEVICES-1)) 1); do
-			    rm "$FSIMAGEP${i}.img"
-			done
 			exit 99;
 		    fi
 		    ;;
Signature · 1 line
2.32.0
Reviewed-by on v1 8/10
#9 lore raw

Re: [PATCH 08/10] grub-shell: Boot PowerPC using PMU instead of CUDA for power management

In reply to Glenn Washburn

Dear Glenn,

Thank you. I noticed two small typos.

Am 18.09.21 um 01:04 schrieb Glenn Washburn:

Quoted 1 line

At some point it looks like the defualt machine for qemu-system-ppc started

default

Quoted 3 lines

using CUDA as a backend for power management. This causes the machine to throw an exception and not actually power down the VM[1]. Switching to PMU allows power downs and reboots to work as expceted.

expected

Quoted 1 line

[1] https://gitlab.com/qemu-project/qemu/-/issues/624

Thank you for reporting this upstream.

Quoted 11 lines
---
  tests/util/grub-shell.in | 1 +
  1 file changed, 1 insertion(+)
tests/util/grub-shell.in +0 -0
index 93e9f5148..5354d8678 100644

tests/util/grub-shell.in case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in · line 90

Quoted 7 lines
tests/util/grub-shell.in +1 -0
@@ -84,6 +84,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
  	serial_null="-serial null"
  	netbootext=elf
  	trim=1
+	qemuopts="-M mac99,via=pmu $qemuopts"
  	;;
 
      sparc64-ieee1275)

Kind regards,

Paul

#10 lore raw

Re: [PATCH 08/10] grub-shell: Boot PowerPC using PMU instead of CUDA for power management

In reply to Glenn Washburn
Quoted 4 lines · On Fri, 17 Sep 2021 23:04:02 +0000 Glenn Washburn…

At some point it looks like the defualt machine for qemu-system-ppc started using CUDA as a backend for power management. This causes the machine to throw an exception and not actually power down the VM[1]. Switching to PMU allows power downs and reboots to work as expceted.

As noted in the discussion on the qemu issue, this commit message is not accurate. So I need to update the message, but the contents of the patch will remain the same.

Glenn

Quoted 20 lines

[1] https://gitlab.com/qemu-project/qemu/-/issues/624

---
 tests/util/grub-shell.in | 1 +
 1 file changed, 1 insertion(+)
tests/util/grub-shell.in +1 -0
index 93e9f5148..5354d8678 100644
@@ -84,6 +84,7 @@ case "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" in
 	serial_null="-serial null"
 	netbootext=elf
 	trim=1
+	qemuopts="-M mac99,via=pmu $qemuopts"
 	;;
 
     sparc64-ieee1275)
Reviewed-by on the v1 series
#13 lore raw
In reply to Glenn Washburn
Quoted 9 lines · Glenn Washburn

Here is another patch series of changes needed to get the make check tests passing on fairly recent Ubuntu/Debian systems, though most of the fixes are for issues on fairly old systems as well (eg. reiser fixes). The FAT volume label change is only needed on fairly recent systems because up until very recently a fairly old version of dosfstools has been used which didn't do invalid character checking.

Glenn

Quoted 14 lines

Glenn Washburn (10):
tests: Rename variable filtime -> filetime as its meant to be
tests: mkreiserfs only supports 4096 block size
tests: Disable reiserfs tests for old format because newer kernels do
not support them
tests: mkfs.btrfs now supports only 4k sector sizes and above
tests: Only test minix3 volumes of 1k block size
tests: Change FAT volume label to be with in the valid character range
tests: Skip hfs test only when mac_roman module is not loaded and not
loadable
grub-shell: Boot PowerPC using PMU instead of CUDA for power
management
tests: Output list of devices when partmap fails
tests: Do not delete filesystem images on error

You do not need to repost whole series. Just send the patches which did not get my RB for this and earlier series.

Daniel