]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
tests/util/grub-fs-tester: Avoid failing some file system tests due to file system...
authorGlenn Washburn <development@efficientek.com>
Sun, 14 May 2023 04:52:56 +0000 (23:52 -0500)
committerDaniel Kiper <daniel.kiper@oracle.com>
Wed, 17 May 2023 16:19:02 +0000 (18:19 +0200)
On some systems /usr/share/dict/american-english can be larger than the
available space on the filesystem being tested (e.g. vfat12a). This
causes a failure of the filesystem test and is not a real test failure.
Instead, use dd to copy at most 1 MiB of data to the filesystem, which is
enough for our purposes and will not fill any of the tested filesystems.

Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
tests/util/grub-fs-tester.in

index 1030098b46add002f5bb589073716d0f82760a1a..ea8b2d1f6e8e1ab2e6a11a0345bf4082fcef4e08 100644 (file)
@@ -1058,15 +1058,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE" 1); do
            if [ x$CASESENS = xy ]; then
                "$builddir"/garbage-gen $BLOCKCNT > "$MNTPOINTRW/$OSDIR/cAsE"
            fi
-           if (test x$fs = xvfat12a || test x$fs = xmsdos12a) && test x$BLKSIZE = x131072; then
-               # With this config there isn't enough space for full copy.
-               # Copy as much as we can
-               cp "${CFILESRC}" "$MNTPOINTRW/$OSDIR/${CFILE}" &> /dev/null;
-           else
-
-               cp "${CFILESRC}" "$MNTPOINTRW/$OSDIR/${CFILE}";
-
-           fi
+           dd if="${CFILESRC}" of="$MNTPOINTRW/$OSDIR/${CFILE}" bs=1024 count=1024
 
            if [ x$NOSYMLINK != xy ]; then
                ln -s "$BASEFILE" "$MNTPOINTRW/$OSDIR/$BASESYM"