From: myoungwon oh Date: Sun, 18 Nov 2018 04:37:02 +0000 (+0900) Subject: src/test: add max-thread test in test_dedup_tool.sh X-Git-Tag: v14.1.0~83^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=f8e26cd3f3df6395258cb04cf16a618ef693cd08;p=ceph.git src/test: add max-thread test in test_dedup_tool.sh Signed-off-by: Myoungwon Oh --- diff --git a/src/test/test_dedup_tool.sh b/src/test/test_dedup_tool.sh index f7fc2a195e0..ecf7fa57f13 100755 --- a/src/test/test_dedup_tool.sh +++ b/src/test/test_dedup_tool.sh @@ -72,7 +72,25 @@ function test_dedup_ratio_fixed() die "Estimate failed expecting 4096 result $RESULT" fi + # case 3 max_thread + for num in `seq 0 20` + do + dd if=/dev/zero of=dedup_object_$num bs=4M count=1 + $RADOS_TOOL -p $POOL put dedup_object_$num ./dedup_object_$num + done + + RESULT=$($DEDUP_TOOL --op estimate --pool $POOL --chunk-size 4096 --chunk-algorithm fixed --fingerprint-algorithm sha1 --max-thread 4 | grep result | awk '{print$2}') + echo $RESULT + if [ 10485760 -ne $RESULT ]; + then + die "Estimate failed expecting 10485760 result $RESULT" + fi + rm -rf ./dedup_object_1k ./dedup_object_100k ./dedup_object_10m + for num in `seq 0 20` + do + rm -rf ./dedup_object_$num + done } function test_dedup_chunk_scrub()