summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Greenan <kmgreen2@gmail.com>2013-11-18 21:13:59 -0800
committerKevin Greenan <kmgreen2@gmail.com>2013-11-18 21:13:59 -0800
commit07de6b80f86ec5f942f907fd5542fffa72ca02a5 (patch)
tree5d8540d442c894364567a8af85f740b802bfa6f5
parentd23b6d53436cdcd027b428969565a7d0c6f8ed59 (diff)
downloadjerasure-07de6b80f86ec5f942f907fd5542fffa72ca02a5.tar.gz
Make sure tests always grab aligned buffers (use valloc instead of malloc).
-rwxr-xr-xTest/reed_sol_test_01.c2
-rwxr-xr-xTest/reed_sol_test_02.c2
-rwxr-xr-xTest/test_all_gfs.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/Test/reed_sol_test_01.c b/Test/reed_sol_test_01.c
index 50570e2..f479718 100755
--- a/Test/reed_sol_test_01.c
+++ b/Test/reed_sol_test_01.c
@@ -59,7 +59,7 @@ POSSIBILITY OF SUCH DAMAGE.
#define BUFSIZE 4096
-#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
+#define talloc(type, num) (type *) valloc(sizeof(type)*(num))
usage(char *s)
{
diff --git a/Test/reed_sol_test_02.c b/Test/reed_sol_test_02.c
index 0a2138f..039a945 100755
--- a/Test/reed_sol_test_02.c
+++ b/Test/reed_sol_test_02.c
@@ -57,7 +57,7 @@ POSSIBILITY OF SUCH DAMAGE.
#include "jerasure.h"
#include "reed_sol.h"
-#define talloc(type, num) (type *) malloc(sizeof(type)*(num))
+#define talloc(type, num) (type *) valloc(sizeof(type)*(num))
void
timer_start (double *t)
diff --git a/Test/test_all_gfs.sh b/Test/test_all_gfs.sh
index ea658ba..af2e0fa 100755
--- a/Test/test_all_gfs.sh
+++ b/Test/test_all_gfs.sh
@@ -15,7 +15,7 @@ while read method; do
done
# Test all w=16
-${GF_METHODS} | grep -v 'TABLE' | awk -F: '{ if ($1 == "w=16") print $2; }' |
+${GF_METHODS} | awk -F: '{ if ($1 == "w=16") print $2; }' |
while read method; do
echo "Testing ${k} ${m} 16 ${method}"
./reed_sol_test_01 ${k} ${m} 16 ${method}