]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
erasure-code: workunit to check for encoding regression
authorLoic Dachary <loic-201408@dachary.org>
Sat, 13 Sep 2014 11:36:09 +0000 (13:36 +0200)
committerLoic Dachary <ldachary@redhat.com>
Tue, 25 Nov 2014 15:31:35 +0000 (16:31 +0100)
Clone the archive of encoded objects and decode all archived objects, up
to and including the current ceph version.

http://tracker.ceph.com/issues/9420 Refs: #9420

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
(cherry picked from commit 7638b15f23976c3265cf766e16cf93af1a7e0091)

.gitmodules
ceph-erasure-code-corpus [new submodule]
qa/workunits/erasure-code/encode-decode-non-regression.sh [new file with mode: 0755]

index 54fe23830ab1d8de3a512b72d1ec74bc3006bca0..464b58b136d75e54f4c4bde7c20e71eb86d1e2b7 100644 (file)
@@ -19,3 +19,7 @@
        path = src/rocksdb
        url = git://github.com/ceph/rocksdb
        ignore = dirty
+[submodule "ceph-erasure-code-corpus"]
+       path = ceph-erasure-code-corpus
+       url = https://github.com/ceph/ceph-erasure-code-corpus.git
+
diff --git a/ceph-erasure-code-corpus b/ceph-erasure-code-corpus
new file mode 160000 (submodule)
index 0000000..f1f95a1
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit f1f95a1de9dea91b0f8830a01e8b8673e3f241e1
diff --git a/qa/workunits/erasure-code/encode-decode-non-regression.sh b/qa/workunits/erasure-code/encode-decode-non-regression.sh
new file mode 100755 (executable)
index 0000000..5ddd25c
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/bash -ex
+#
+# Copyright (C) 2014 Red Hat <contact@redhat.com>
+#
+# Author: Loic Dachary <loic@dachary.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Library Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU Library Public License for more details.
+#
+: ${CORPUS:=https://github.com/dachary/ceph-erasure-code-corpus.git}
+: ${DIRECTORY:=../ceph-erasure-code-corpus}
+
+# when running from sources, the current directory must have precedence
+export PATH=:$PATH
+
+if ! test -d $DIRECTORY ; then
+    git clone $CORPUS $DIRECTORY
+fi
+
+my_version=v$(ceph --version | cut -f3 -d ' ')
+
+all_versions=$((ls -d $DIRECTORY/v* ; echo $DIRECTORY/$my_version ) | sort)
+
+for version in $all_versions ; do
+    if test -d $version ; then
+        $version/non-regression.sh
+    fi
+    if test $version = $DIRECTORY/$my_version ; then
+        break
+    fi
+done