From: Loic Dachary Date: Sat, 13 Sep 2014 11:36:09 +0000 (+0200) Subject: erasure-code: workunit to check for encoding regression X-Git-Tag: v0.87.1~51^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=1def82d530965bd0441e4f7f6aa032666984f17d;p=ceph.git erasure-code: workunit to check for encoding regression 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 (cherry picked from commit 7638b15f23976c3265cf766e16cf93af1a7e0091) --- diff --git a/.gitmodules b/.gitmodules index 54fe23830ab..464b58b136d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 index 00000000000..f1f95a1de9d --- /dev/null +++ b/ceph-erasure-code-corpus @@ -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 index 00000000000..5ddd25c445c --- /dev/null +++ b/qa/workunits/erasure-code/encode-decode-non-regression.sh @@ -0,0 +1,38 @@ +#!/bin/bash -ex +# +# Copyright (C) 2014 Red Hat +# +# Author: Loic Dachary +# +# 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