]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
src/test: add max-thread test in test_dedup_tool.sh
authormyoungwon oh <omwmw@sk.com>
Sun, 18 Nov 2018 04:37:02 +0000 (13:37 +0900)
committermyoungwon oh <omwmw@sk.com>
Sat, 26 Jan 2019 03:10:23 +0000 (12:10 +0900)
Signed-off-by: Myoungwon Oh <omwmw@sk.com>
src/test/test_dedup_tool.sh

index f7fc2a195e0bd0be8c3ed837c4af77f5b193894a..ecf7fa57f133c14ddf43302e72ff30983c49bdf1 100755 (executable)
@@ -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()