source $(dirname $0)/../detect-build-env-vars.sh
source $CEPH_ROOT/qa/workunits/ceph-helpers.sh
+if [ `uname` = FreeBSD ]; then
+ # erasure coding overwrites are only tested on Bluestore
+ # erasure coding on filestore is unsafe
+ # http://docs.ceph.com/docs/master/rados/operations/erasure-code/#erasure-coding-with-overwrites
+ use_ec_overwrite=false
+else
+ use_ec_overwrite=true
+fi
+
# Test development and debugging
# Set to "yes" in order to ignore diff errors and save results to update test
getjson="no"
# Ignore the epoch and filter out the attr '_' value because it has date information and won't match
-jqfilter='.inconsistents | (.[].shards[].attrs[] | select(.name == "_") | .value) |= "----Stripped-by-test----"'
+jqfilter='.inconsistents | (.[].shards[].attrs[]? | select(.name == "_") | .value) |= "----Stripped-by-test----"'
sortkeys='import json; import sys ; JSON=sys.stdin.read() ; ud = json.loads(JSON) ; print json.dumps(ud, sort_keys=True, indent=2)'
# Remove items are not consistent across runs, the pg interval and client
}
function TEST_auto_repair_erasure_coded_overwrites() {
- auto_repair_erasure_coded $1 true
+ if [ "$use_ec_overwrite" = "true" ]; then
+ auto_repair_erasure_coded $1 true
+ fi
}
function corrupt_and_repair_jerasure() {
}
function TEST_corrupt_and_repair_jerasure_overwrites() {
- corrupt_and_repair_jerasure $1 true
+ if [ "$use_ec_overwrite" = "true" ]; then
+ corrupt_and_repair_jerasure $1 true
+ fi
}
function corrupt_and_repair_lrc() {
}
function TEST_corrupt_and_repair_lrc_overwrites() {
- corrupt_and_repair_jerasure $1 true
+ if [ "$use_ec_overwrite" = "true" ]; then
+ corrupt_and_repair_jerasure $1 true
+ fi
}
function unfound_erasure_coded() {
}
function TEST_unfound_erasure_coded_overwrites() {
- unfound_erasure_coded $1 true
+ if [ "$use_ec_overwrite" = "true" ]; then
+ unfound_erasure_coded $1 true
+ fi
}
#
}
function TEST_list_missing_erasure_coded_overwrites() {
- list_missing_erasure_coded $1 true
+ if [ "$use_ec_overwrite" = "true" ]; then
+ list_missing_erasure_coded $1 true
+ fi
}
#
}
function TEST_corrupt_scrub_erasure_overwrites() {
- corrupt_scrub_erasure $1 true
+ if [ "$use_ec_overwrite" = "true" ]; then
+ corrupt_scrub_erasure $1 true
+ fi
}
#