From e9276230e13e2c67b9944c604e8d4485ee3e3a63 Mon Sep 17 00:00:00 2001 From: Emmanuel Dreyfus Date: Sun, 1 Feb 2015 03:48:05 +0100 Subject: Emulate Linux truncate for G and GB units Recent modification in sparse-file-self-heal.t added a truncate -s 1G, and that unit was not emulated correctly for non Linux systems. As a result, all regression tests hang. Fill the gap to restore regression. BUG: 1129939 Change-Id: Ib45376b4b2e74d1868f3ebdd5564b2186b4318fa Signed-off-by: Emmanuel Dreyfus Reviewed-on: http://review.gluster.org/9519 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- tests/include.rc | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/include.rc b/tests/include.rc index 1e0e08cbb7c..e7d982f7e5d 100644 --- a/tests/include.rc +++ b/tests/include.rc @@ -569,7 +569,7 @@ which truncate > /dev/null || { exit 2; } - echo $newsize | egrep -q '[GTPEZY]B?$' && { + echo $newsize | egrep -q '[TPEZY]B?$' && { echo "Unit not implemented for ${newsize}" exit 2; } @@ -587,6 +587,12 @@ which truncate > /dev/null || { *M) newsize=$(( ${newsize/M/} * 1024 * 1024 )) ;; + *GB) + newsize=$(( ${newsize/GB/} * 1000 * 1000 * 1000 )) + ;; + *G) + newsize=$(( ${newsize/G/} * 1024 * 1024 * 1024 )) + ;; esac fi -- cgit