We use common function _get_max_file_size to get the max file size supported by the filesystems and let the code be clean. Signed-off-by: Yufen Yu <yuyufen@xxxxxxxxxx> --- tests/generic/350 | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/tests/generic/350 b/tests/generic/350 index 0aea4c09..f1d9887b 100755 --- a/tests/generic/350 +++ b/tests/generic/350 @@ -47,17 +47,8 @@ md5sum $dev | sed -e "s|$dev|SCSI_DEBUG_DEV|g" echo "Punch to MAX_LFS_FILESIZE" # zod = MAX_LFS_FILESIZE -case "$(getconf LONG_BIT)" in -"32") - zod=$(( ($(getconf PAGE_SIZE) << ($(getconf LONG_BIT) - 1) ) - 1)) - ;; -"64") - zod=9223372036854775807 - ;; -*) - _fail "sizeof(long) == $(getconf LONG_BIT)?" - ;; -esac +zod=$(_get_max_file_size) + $XFS_IO_PROG -c "fpunch 0 $zod" $dev echo "Check contents" -- 2.16.2.dirty