[Ocfs2-test-devel] [PATCH 1/2] Resize_test: Kill a deadloop case in resize_test.sh

Tristan Ye tristan.ye at oracle.com
Tue Mar 16 00:10:20 PDT 2010


Currently, resize_test will be running into a deadloop if our partition size
didn't align with clustersize when growing the volumesize to the end of the
partition, in that case, ${blocks} will never be equal to ${partsz}, which caused
while loop endless.

This patch attempts to kill this by checking the above case to break the loop.

Signed-off-by: Tristan Ye <tristan.ye at oracle.com>
---
 programs/resize_test/resize_test.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/programs/resize_test/resize_test.sh b/programs/resize_test/resize_test.sh
index b779d97..bc483d1 100755
--- a/programs/resize_test/resize_test.sh
+++ b/programs/resize_test/resize_test.sh
@@ -270,7 +270,7 @@ normal_resize_test() {
 
 		do_fsck ${fsckout}
 
-		if [ $alldone -eq 1 ] || [ ${blocks} -eq 0 ] || [ ${blocks} -eq ${partsz} ]
+		if [ $alldone -eq 1 ] || [ ${blocks} -eq 0 ] || [ ${blocks} -eq ${partsz} ] || [ $((${blocks}+%{bpc})) -gt ${partsz} ]
 		then
 			break;
 		fi
-- 
1.5.5




More information about the Ocfs2-test-devel mailing list