From d7107c100422019cef7f9469774e254202e6e75e Mon Sep 17 00:00:00 2001 From: lijiaxu Date: Thu, 16 Apr 2020 16:36:14 +0800 Subject: [PATCH] qa/workunits/erasure-code/bench.sh:fix the error of getting encoding technique in ec test MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Isa / jerasure codec ‘technique’, obtained by the following statements, "eval technique_parameter=\$${plugin}2technique_${technique}", which generate a string such as "isa2technique_vandermonde", and assign the value of "technique_parameter" to "isa2technique_vandermonde". String such as "isa2technique_vandermonde" should have a preset value, but it does not, which will cause string "technique_parameter" to be empty. Run the script, prompt the following error message and exit: isa technique= is not a valid coding technique. Choose one of the following: reed_sol_van,cauchy To fix the bug, specify a preset value for "technique_parameter": + isa2technique_vandermonde='reed_sol_van' + isa2technique_cauchy='cauchy' + jerasure2technique_vandermonde='reed_sol_van' + jerasure2technique_cauchy='cauchy_good' Signed-off-by: lijiaxu --- qa/workunits/erasure-code/bench.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/qa/workunits/erasure-code/bench.sh b/qa/workunits/erasure-code/bench.sh index 23914ef82d2e..8e288f053eca 100755 --- a/qa/workunits/erasure-code/bench.sh +++ b/qa/workunits/erasure-code/bench.sh @@ -111,6 +111,10 @@ function bench_run() { k2ms[4]="2 3" k2ms[6]="2 3 4" k2ms[10]="3 4" + local isa2technique_vandermonde='reed_sol_van' + local isa2technique_cauchy='cauchy' + local jerasure2technique_vandermonde='reed_sol_van' + local jerasure2technique_cauchy='cauchy_good' for technique in ${TECHNIQUES} ; do for plugin in ${PLUGINS} ; do eval technique_parameter=\$${plugin}2technique_${technique} -- 2.47.3