#include <zlib.h>
#include <math.h>
#include <stdlib.h>
+#include <unistd.h>
#include <rte_cycles.h>
#include <rte_malloc.h>
unsigned int i;
if (rte_compressdev_count() == 0) {
- RTE_LOG(ERR, USER1, "Need at least one compress device\n");
- return TEST_FAILED;
+ RTE_LOG(WARNING, USER1, "Need at least one compress device\n");
+ return TEST_SKIPPED;
}
RTE_LOG(NOTICE, USER1, "Running tests on device %s\n",
uint16_t i;
const struct rte_compressdev_capabilities *capab;
- RTE_LOG(INFO, USER1, "This is a negative test errors are expected\n");
+ RTE_LOG(ERR, USER1, "This is a negative test errors are expected\n");
capab = rte_compressdev_capability_get(0, RTE_COMP_ALGO_DEFLATE);
TEST_ASSERT(capab != NULL, "Failed to retrieve device capabilities");
RTE_COMP_OP_STATELESS,
LB_BOTH,
ZLIB_DECOMPRESS,
- 1,
+ 1, /* run out-of-space test */
0
};
/* Compress with compressdev, decompress with Zlib */
struct comp_testsuite_params *ts_params = &testsuite_params;
uint16_t i = 0;
int ret = TEST_SUCCESS;
+ int j;
const struct rte_compressdev_capabilities *capab;
char *test_buffer = NULL;
struct interim_data_params int_data = {
(const char * const *)&test_buffer,
1,
- NULL,
+ &i,
&ts_params->def_comp_xform,
&ts_params->def_decomp_xform,
1
/* fill the buffer with data based on rand. data */
srand(BIG_DATA_TEST_SIZE);
- for (uint32_t i = 0; i < BIG_DATA_TEST_SIZE - 1; ++i)
- test_buffer[i] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
-
+ for (j = 0; j < BIG_DATA_TEST_SIZE - 1; ++j)
+ test_buffer[j] = (uint8_t)(rand() % ((uint8_t)-1)) | 1;
test_buffer[BIG_DATA_TEST_SIZE-1] = 0;
- int_data.buf_idx = &i;
/* Compress with compressdev, decompress with Zlib */
test_data.zlib_dir = ZLIB_DECOMPRESS;