]> git.proxmox.com Git - ceph.git/blob - ceph/src/erasure-code/jerasure/jerasure/Examples/time_all_gfs_argv_init.sh
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / erasure-code / jerasure / jerasure / Examples / time_all_gfs_argv_init.sh
1 #
2 #
3 # Copyright (c) 2013, James S. Plank and Kevin Greenan
4 # All rights reserved.
5 #
6 # Jerasure - A C/C++ Library for a Variety of Reed-Solomon and RAID-6 Erasure
7 # Coding Techniques
8 #
9 # Revision 2.0: Galois Field backend now links to GF-Complete
10 #
11 # Redistribution and use in source and binary forms, with or without
12 # modification, are permitted provided that the following conditions
13 # are met:
14 #
15 # - Redistributions of source code must retain the above copyright
16 # notice, this list of conditions and the following disclaimer.
17 #
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
21 # distribution.
22 #
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.
26 #
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.
39 #
40 GF_COMPLETE_DIR=/usr/local/bin
41 GF_METHODS=${GF_COMPLETE_DIR}/gf_methods
42 ITERATIONS=128
43 BUFSIZE=65536
44 k=12
45 m=3
46 seed=1370
47
48 for w in 8 16 32 ; do
49 ${GF_METHODS} $w -B -L | awk -F: '{ if ($1 == "w='$w'") print $2; }' |
50 while read method; do
51 echo "Testing ${k} ${m} ${w} ${seed} ${ITERATIONS} ${BUFSIZE} ${method}"
52 ./reed_sol_time_gf ${k} ${m} ${w} ${seed} ${ITERATIONS} ${BUFSIZE} ${method} | tail -n 2
53 if [[ $? != "0" ]]; then
54 echo "Failed test for ${k} ${m} ${w} ${seed} ${ITERATIONS} ${BUFSIZE} ${method}"
55 exit 1
56 fi
57 done
58
59 if [[ $? == "1" ]]; then
60 exit 1
61 fi
62 done
63
64 echo "Passed all tests!"