Added initial tests for Compressdev library. The tests are performed compressing a test buffer (or multiple test buffers) with compressdev or Zlib, and decompressing it/them with the other library (if compression is done with compressdev, decompression is done with Zlib, and viceversa).
Tests added so far are based on the deflate algorithm, including: - Fixed huffman on single buffer - Dynamic huffman on single buffer - Multi compression level test on single buffer - Multi buffer - Multi xform using the same buffer Due to a dependency on Zlib, the test is not enabled by default. Once the library is installed, the configuration option CONFIG_RTE_COMPRESSDEV_TEST must be set to Y. However, if building with Meson, the test will be built automatically, if Zlib is installed. The test requires a compressdev PMD to be initialized, when running the test app. For example: ./build/app/test --vdev="compress_X" RTE>>compressdev_autotest This patchset depends on the Compressdev API patchset: http://dpdk.org/ml/archives/dev/2018-April/099580.html ("[PATCH v6 00/14] Implement compression API") Changes in v3: - Remove next pointer in xform setting - Remove unneeded DIV_CEIL macro - Add rte_compressdev_close() call after finishing test cases Changes in v2: - Add meson build - Add invalid configuration tests - Use new Compressdev API: * Substitute session with priv xform * Check if priv xform is shareable and create one per operation if not Pablo de Lara (5): test/compress: add initial unit tests test/compress: add multi op test test/compress: add multi level test test/compress: add multi xform test test/compress: add invalid configuration tests config/common_base | 5 + test/test/Makefile | 9 + test/test/meson.build | 8 + test/test/test_compressdev.c | 1092 ++++++++++++++++++++++++++++++ test/test/test_compressdev_test_buffer.h | 295 ++++++++ 5 files changed, 1409 insertions(+) create mode 100644 test/test/test_compressdev.c create mode 100644 test/test/test_compressdev_test_buffer.h -- 2.14.3