From 80bb97fd96deebf29728b0bf3899741bb39b6dd1 Mon Sep 17 00:00:00 2001 From: czurnieden Date: Sun, 26 May 2019 03:50:33 +0200 Subject: [PATCH 1/3] corrected path for autotune-output --- testme.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testme.sh b/testme.sh index 306c67dcb..f34d96f6f 100755 --- a/testme.sh +++ b/testme.sh @@ -126,9 +126,9 @@ _runtest() then # "make tune" will run "tune_it.sh" automatically, hence "autotune", but it cannot # get switched off without some effort, so we just let it run twice for testing purposes - _make "$1" "$2" "" echo -e "\rRun autotune $1 $2" - $_timeout $TUNE_CMD > ../test_${suffix}.log || _die "running autotune" $? + _make "$1" "$2" "" + $_timeout $TUNE_CMD > test_${suffix}.log || _die "running autotune" $? else _make "$1" "$2" "test_standalone" echo -e "\rRun test $1 $2" From 0e1a0e6529cb896ebca497f547d00916f1874217 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 24 May 2019 11:27:03 +0200 Subject: [PATCH 2/3] also test mp_shrink() --- demo/test.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/demo/test.c b/demo/test.c index c8b696a3a..8c67e2577 100644 --- a/demo/test.c +++ b/demo/test.c @@ -137,7 +137,11 @@ static int test_trivial_stuff(void) static int check_get_set_i32(mp_int *a, int32_t b) { + mp_clear(a); + if (mp_shrink(a) != MP_OKAY) return EXIT_FAILURE; + mp_set_i32(a, b); + if (mp_shrink(a) != MP_OKAY) return EXIT_FAILURE; if (mp_get_i32(a) != b) return EXIT_FAILURE; if (mp_get_u32(a) != (uint32_t)b) return EXIT_FAILURE; if (mp_get_mag32(a) != uabs32(b)) return EXIT_FAILURE; @@ -180,7 +184,11 @@ static int test_mp_get_set_i32(void) static int check_get_set_i64(mp_int *a, int64_t b) { + mp_clear(a); + if (mp_shrink(a) != MP_OKAY) return EXIT_FAILURE; + mp_set_i64(a, b); + if (mp_shrink(a) != MP_OKAY) return EXIT_FAILURE; if (mp_get_i64(a) != b) return EXIT_FAILURE; if (mp_get_u64(a) != (uint64_t)b) return EXIT_FAILURE; if (mp_get_mag64(a) != uabs64(b)) return EXIT_FAILURE; From 345173a3116a6b584be460add4d331c3e4df7476 Mon Sep 17 00:00:00 2001 From: Steffen Jaeckel Date: Fri, 24 May 2019 11:27:42 +0200 Subject: [PATCH 3/3] make it possible to run etc/tune_it.sh from wherever you want --- etc/tune_it.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/tune_it.sh b/etc/tune_it.sh index 60a44784d..b323410bb 100755 --- a/etc/tune_it.sh +++ b/etc/tune_it.sh @@ -35,11 +35,12 @@ median() { echo $median } -MPWD=$(pwd) +MPWD=$(dirname $(readlink -f "$0")) FILE_NAME="tuning_list" -TOMMATH_CUTOFFS_H="../tommath_cutoffs.h" +TOMMATH_CUTOFFS_H="$MPWD/../tommath_cutoffs.h" BACKUP_SUFFIX=".orig" -RNUM=0; +RNUM=0 + ############################################################################# # It would be a good idea to isolate these processes (with e.g.: cpuset) # # #