erasure_code: Limit efence test length

Change-Id: Ib3bb0fa2fbcbbb759af7ea54fef5ea24ee1ba7cd
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
This commit is contained in:
Roy Oursler 2017-05-25 14:59:28 -07:00 committed by Xiaodong Liu
parent 52f644d3ff
commit 4f2d148ae5
2 changed files with 5 additions and 2 deletions

View File

@ -47,6 +47,7 @@
#define KMAX TEST_SOURCES
#define EFENCE_TEST_MIN_SIZE 16
#define EFENCE_TEST_MAX_SIZE EFENCE_TEST_MIN_SIZE + 0x100
#ifdef EC_ALIGNED_ADDR
// Define power of 2 range to check ptr, len alignment
@ -489,7 +490,7 @@ int main(int argc, char *argv[])
for (j = 0; j < TEST_LEN; j++)
buffs[i][j] = rand();
for (size = EFENCE_TEST_MIN_SIZE; size <= TEST_SIZE; size += align) {
for (size = EFENCE_TEST_MIN_SIZE; size <= EFENCE_TEST_MAX_SIZE; size += align) {
for (i = 0; i < m; i++) { // Line up TEST_SIZE from end
efence_buffs[i] = buffs[i] + TEST_LEN - size;
}

View File

@ -56,6 +56,8 @@
#define MMAX TEST_SOURCES
#define KMAX TEST_SOURCES
#define EFENCE_TEST_MAX_SIZE 0x100
#ifdef EC_ALIGNED_ADDR
// Define power of 2 range to check ptr, len alignment
# define PTR_ALIGN_CHK_B 0
@ -592,7 +594,7 @@ int main(int argc, char *argv[])
}
}
for (size = 0; size <= TEST_SIZE; size += align) {
for (size = 0; size <= EFENCE_TEST_MAX_SIZE; size += align) {
for (i = 0; i < m; i++) { // Line up TEST_SIZE from end
efence_buffs[i] = buffs[i] + TEST_LEN - size;
efence_update_buffs[i] = update_buffs[i] + TEST_LEN - size;