3 # Copyright (c) 2013, James S. Plank and Kevin Greenan
6 # Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
9 # Revision 2.0: Galois Field backend now links to GF-Complete
11 # Redistribution and use in source and binary forms, with or without
12 # modification, are permitted provided that the following conditions
15 # - Redistributions of source code must retain the above copyright
16 # notice, this list of conditions and the following disclaimer.
18 # - Redistributions in binary form must reproduce the above copyright
19 # notice, this list of conditions and the following disclaimer in
20 # the documentation and/or other materials provided with the
23 # - Neither the name of the University of Tennessee nor the names of its
24 # contributors may be used to endorse or promote products derived
25 # from this software without specific prior written permission.
27 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
28 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
29 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
30 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
31 # HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
32 # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
33 # BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
34 # OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
35 # AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
36 # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
37 # WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
38 # POSSIBILITY OF SUCH DAMAGE.
40 GF_METHODS=${GF_COMPLETE_DIR:-/usr/local/bin}/gf_methods
45 if ! test -x ${GF_METHODS} ; then
51 ${GF_METHODS} 8 -B -L | awk -F: '{ if ($1 == "w=8") print $2; }' |
53 echo "Testing ${k} ${m} 8 $seed ${method}"
54 $VALGRIND ./reed_sol_test_gf ${k} ${m} 8 $seed ${method} | tail -n 1
55 if [[ $? != "0" ]]; then
56 echo "Failed test for ${k} ${m} 8 $seed ${method}"
61 if [[ $? == "1" ]]; then
67 ${GF_METHODS} 16 -B -L | awk -F: '{ if ($1 == "w=16") print $2; }' |
69 echo "Testing ${k} ${m} 16 $seed ${method}"
70 $VALGRIND ./reed_sol_test_gf ${k} ${m} 16 $seed ${method} | tail -n 1
71 if [[ $? != "0" ]]; then
72 echo "Failed test for ${k} ${m} 16 $seed ${method}"
78 if [[ $? == "1" ]]; then
83 ${GF_METHODS} 32 -B -L | awk -F: '{ if ($1 == "w=32") print $2; }' |
85 echo "Testing ${k} ${m} 32 $seed ${method}"
86 $VALGRIND ./reed_sol_test_gf ${k} ${m} 32 $seed ${method} | tail -n 1
87 if [[ $? != "0" ]]; then
88 echo "Failed test for ${k} ${m} 32 $seed ${method}"
94 if [[ $? == "1" ]]; then
98 echo "Passed all tests!"