[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 3/5] tests: Remove $((BASE#NUM)) bashism in grub-fs-tester
From: |
Glenn Washburn |
Subject: |
[PATCH v3 3/5] tests: Remove $((BASE#NUM)) bashism in grub-fs-tester |
Date: |
Sun, 6 Feb 2022 16:00:10 -0600 |
This bashism allows converting NUM in base BASE to decimal. Its not needed
because the only place its used is to convert from hexidecimal and this can
also be done with the more portable $((0xHEXNUM)) syntax.
Signed-off-by: Glenn Washburn <development@efficientek.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
tests/util/grub-fs-tester.in | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/util/grub-fs-tester.in b/tests/util/grub-fs-tester.in
index aa72b2174..a1f3f299b 100644
--- a/tests/util/grub-fs-tester.in
+++ b/tests/util/grub-fs-tester.in
@@ -459,7 +459,7 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE" "$MAXLOGSECSIZE"
1); do
# FIXME: not so sure about AFFS
# OS LIMITATION: minix2/minix3 could be formatted in a way
to permit more.
x"minix3" | x"minix2" | x"hfs"| x"affs" | xaffs_intl |
xreiserfs_old | xext2_old)
- BIGBLOCKCNT=$((16#7fffffff));;
+ BIGBLOCKCNT=$((0x7fffffff));;
# FS LIMITATION: redundant storage
# We have only limited space. Mirroring multiplies it very
effectively.
@@ -669,18 +669,18 @@ for LOGSECSIZE in $(range "$MINLOGSECSIZE"
"$MAXLOGSECSIZE" 1); do
# mkfs.hfs and mkfs.hfsplus don't fill UUID.
x"hfsplus")
"mkfs.hfsplus" -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
- dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1
seek=$((16#468)) conv=notrunc count=8 ;;
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468))
conv=notrunc count=8 ;;
x"hfsplus_wrap")
"mkfs.hfsplus" -w -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
- dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1
seek=$((16#468)) conv=notrunc count=8
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468))
conv=notrunc count=8
MOUNTFS="hfsplus";;
x"hfsplus_casesens")
"mkfs.hfsplus" -s -b $BLKSIZE -v "$FSLABEL" "${MOUNTDEVICE}"
- dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1
seek=$((16#468)) conv=notrunc count=8
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x468))
conv=notrunc count=8
MOUNTFS="hfsplus";;
x"hfs")
"mkfs.hfs" -b $BLKSIZE -v "`echo $FSLABEL |recode
utf8..macroman`" -h "${MOUNTDEVICE}"
- dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1
seek=$((16#474)) conv=notrunc count=8
+ dd if=/dev/urandom of="${MOUNTDEVICE}" bs=1 seek=$((0x474))
conv=notrunc count=8
MOUNTOPTS="iocharset=utf8,codepage=macroman,"
;;
x"vfat"*|xmsdos*)
--
2.27.0
- [PATCH v3 0/5] Various test fixes and improvements, Glenn Washburn, 2022/02/06
- [PATCH v3 1/5] tests: Do not remove image file on error in pata_test, Glenn Washburn, 2022/02/06
- [PATCH v3 5/5] tests: Ensure that loopback devices and zfs devices are cleaned up, Glenn Washburn, 2022/02/06
- [PATCH v3 4/5] tests: Ensure that mountpoints are unmounted before exiting, Glenn Washburn, 2022/02/06
- [PATCH v3 3/5] tests: Remove $((BASE#NUM)) bashism in grub-fs-tester,
Glenn Washburn <=
- [PATCH v3 2/5] tests: Skip pata_test on i386-efi, Glenn Washburn, 2022/02/06
- Re: [PATCH v3 0/5] Various test fixes and improvements, Daniel Kiper, 2022/02/08