Skip to content

Commit

Permalink
erasure-code: workunit to check for encoding regression
Browse files Browse the repository at this point in the history
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: ceph#9420

Signed-off-by: Loic Dachary <[email protected]>
  • Loading branch information
Loic Dachary authored and ldachary committed Nov 10, 2014
1 parent f590130 commit 7638b15
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 change: 1 addition & 0 deletions ceph-erasure-code-corpus
38 changes: 38 additions & 0 deletions qa/workunits/erasure-code/encode-decode-non-regression.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash -ex
#
# Copyright (C) 2014 Red Hat <[email protected]>
#
# Author: Loic Dachary <[email protected]>
#
# 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

0 comments on commit 7638b15

Please sign in to comment.