]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tests: use erasure_code_plugin_exists from ceph-helpers.sh
authorLoic Dachary <ldachary@redhat.com>
Sun, 7 Jun 2015 08:52:31 +0000 (10:52 +0200)
committerLoic Dachary <ldachary@redhat.com>
Sun, 7 Jun 2015 08:52:31 +0000 (10:52 +0200)
Instead of the local plugin_exists helper that does the same.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
src/test/erasure-code/test-erasure-code.sh

index ba62ba57e0fca9c6314b0225bf1a1242a106f635..ed699b024e3d07973220a4769de72271ab541c4c 100755 (executable)
@@ -101,20 +101,6 @@ function rados_put_get() {
     rm $dir/ORIGINAL
 }
 
-function plugin_exists() {
-    local plugin=$1
-
-    local status
-    if ./ceph osd erasure-code-profile set TESTPROFILE plugin=$plugin 2>&1 |
-        grep "$plugin.*No such file" ; then
-        status=1
-    else
-        status=0
-        ./ceph osd erasure-code-profile rm TESTPROFILE
-    fi
-    return $status
-}
-
 function TEST_rados_put_get_lrc_advanced() {
     local dir=$1
     local poolname=pool-lrc-a
@@ -153,7 +139,7 @@ function TEST_rados_put_get_lrc_kml() {
 }
 
 function TEST_rados_put_get_isa() {
-    if ! plugin_exists isa ; then
+    if ! erasure_code_plugin_exists isa ; then
         echo "SKIP because plugin isa has not been built"
         return 0
     fi