File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed
Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -137,7 +137,11 @@ static int test_trivial_stuff(void)
137137
138138static int check_get_set_i32 (mp_int * a , int32_t b )
139139{
140+ mp_clear (a );
141+ if (mp_shrink (a ) != MP_OKAY ) return EXIT_FAILURE ;
142+
140143 mp_set_i32 (a , b );
144+ if (mp_shrink (a ) != MP_OKAY ) return EXIT_FAILURE ;
141145 if (mp_get_i32 (a ) != b ) return EXIT_FAILURE ;
142146 if (mp_get_u32 (a ) != (uint32_t )b ) return EXIT_FAILURE ;
143147 if (mp_get_mag32 (a ) != uabs32 (b )) return EXIT_FAILURE ;
@@ -180,7 +184,11 @@ static int test_mp_get_set_i32(void)
180184
181185static int check_get_set_i64 (mp_int * a , int64_t b )
182186{
187+ mp_clear (a );
188+ if (mp_shrink (a ) != MP_OKAY ) return EXIT_FAILURE ;
189+
183190 mp_set_i64 (a , b );
191+ if (mp_shrink (a ) != MP_OKAY ) return EXIT_FAILURE ;
184192 if (mp_get_i64 (a ) != b ) return EXIT_FAILURE ;
185193 if (mp_get_u64 (a ) != (uint64_t )b ) return EXIT_FAILURE ;
186194 if (mp_get_mag64 (a ) != uabs64 (b )) return EXIT_FAILURE ;
Original file line number Diff line number Diff line change @@ -35,11 +35,12 @@ median() {
3535 echo $median
3636}
3737
38- MPWD=$( pwd )
38+ MPWD=$( dirname $( readlink -f " $0 " ) )
3939FILE_NAME=" tuning_list"
40- TOMMATH_CUTOFFS_H=" ../tommath_cutoffs.h"
40+ TOMMATH_CUTOFFS_H=" $MPWD / ../tommath_cutoffs.h"
4141BACKUP_SUFFIX=" .orig"
42- RNUM=0;
42+ RNUM=0
43+
4344# ############################################################################
4445# It would be a good idea to isolate these processes (with e.g.: cpuset) #
4546# #
Original file line number Diff line number Diff line change @@ -126,9 +126,9 @@ _runtest()
126126 then
127127 # "make tune" will run "tune_it.sh" automatically, hence "autotune", but it cannot
128128 # get switched off without some effort, so we just let it run twice for testing purposes
129- _make " $1 " " $2 " " "
130129 echo -e " \rRun autotune $1 $2 "
131- $_timeout $TUNE_CMD > ../test_${suffix} .log || _die " running autotune" $?
130+ _make " $1 " " $2 " " "
131+ $_timeout $TUNE_CMD > test_${suffix} .log || _die " running autotune" $?
132132 else
133133 _make " $1 " " $2 " " test_standalone"
134134 echo -e " \rRun test $1 $2 "
You can’t perform that action at this time.
0 commit comments