igzip: Fix small bugs in igzip_rand_test on test failure.

Change-Id: I7677c3f28ddd9feee22632cb0f117ba2a4dfbc65
Signed-off-by: Roy Oursler <roy.j.oursler@intel.com>
This commit is contained in:
Roy Oursler 2016-08-24 11:01:13 -07:00 committed by Greg Tucker
parent c17f2959d4
commit 7391f27cca

View File

@ -1306,6 +1306,7 @@ int test_compress_stateless(uint8_t * in_data, uint32_t in_size, uint32_t flush_
}
}
print_error(ret);
if (ret) {
if (z_buf != NULL) {
free(z_buf);
@ -1785,6 +1786,8 @@ int main(int argc, char *argv[])
for (i = 0; i < RANDOMS / 16; i++) {
create_rand_repeat_data(in_buf, PAGE_SIZE);
ret |= test_compress_stateless(in_buf, PAGE_SIZE, NO_FLUSH); // good for efence
if (ret)
return ret;
}
fin_ret |= ret;
@ -1848,8 +1851,9 @@ int main(int argc, char *argv[])
for (i = 0; i < RANDOMS / 16; i++) {
create_rand_repeat_data(in_buf, PAGE_SIZE);
ret |= test_compress_stateless(in_buf, PAGE_SIZE, FULL_FLUSH); // good for efence
if (ret)
return ret;
}
fin_ret |= ret;
printf("%s\n", ret ? "Fail" : "Pass");