Skip to contentSkip to conversation

tests/util/grub-fs-tester: Avoid failing some file system tests due to file system filling up

PATCH In review Glenn Washburn 2 participants 2 messages May 14, 2023 – May 16, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/util/grub-fs-tester: Avoid failing some file system tests due to file system filling up

On some systems /usr/share/dict/american-english can be larger than the available space on the filesystem being tested (eg. vfat12a). This causes a failure of the filesystem test and is not a real test failure. Instead, use dd to copy at most 1M of data to the filesystem, which is enough for our purposes and will not fill any of the tested filesystems.

---
 tests/util/grub-fs-tester.in | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
tests/util/grub-fs-tester.in +1 -9
index 9cc6b581197b..a235ff9cda29 100644
@@ -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"
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 7 lines · Glenn Washburn

On some systems /usr/share/dict/american-english can be larger than the available space on the filesystem being tested (eg. vfat12a). This causes a failure of the filesystem test and is not a real test failure. Instead, use dd to copy at most 1M of data to the filesystem, which is enough for our purposes and will not fill any of the tested filesystems.

Daniel