summaryrefslogtreecommitdiffstats
path: root/src/test/compressor (follow)
Commit message (Collapse)AuthorAgeFilesLines
* test_compression: add lz4Haomai Wang2017-06-031-0/+3
| | | | Signed-off-by: Haomai Wang <haomai@xsky.com>
* test/compressor: disable isal tests if not availableKefu Chai2017-05-031-0/+21
| | | | | | | | the isal-zlib compressor plugin is not supported on non-intel archs, and if the user does not have a capable yasm compiler, neither will he/she get this plugin. Signed-off-by: Kefu Chai <kchai@redhat.com>
* test: add override in test submoduleliuchang08122017-03-032-5/+5
| | | | Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
* common: add override for common submodule and miscliuchang08122017-02-162-4/+4
| | | | | | Fixes: http://tracker.ceph.com/issues/18922 Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
* compressor/zstd: add zstd compressorSage Weil2017-01-251-1/+2
| | | | | | | Build/link of zstd itself is maybe not ideal, but it works fine. Signed-off-by: Sage Weil <sage@redhat.com> Signed-off-by: Kefu Chai <kchai@redhat.com>
* test,cmake: turn unit.h into unit.cc to speed up compilationKefu Chai2016-11-282-4/+4
| | | | Signed-off-by: Kefu Chai <kchai@redhat.com>
* common,test: g_ceph_context->put() upon returnKefu Chai2016-11-241-19/+1
| | | | | | | | | | | | | | | | | | | | | prior to this change, global_init() could create a new CephContext and assign it to g_ceph_context. it's our responsibilty to release the CephContext explicitly using cct->put() before the application quits. but sometimes, we fail to do so. in this change, global_init() will return an intrusive_ptr<CephContext>, which calls `g_ceph_context->put()` in its dtor. this ensures that the CephContext is always destroyed before main() returns. so the log is flushed before _log_exp_length is destroyed. there are two cases where global_pre_init() is called directly. - ceph_conf.cc: g_ceph_context->put() will be called by an intrusive_ptr<> deleter. - rgw_main.cc: global_init() is called later on on the success code path, so it will be taken care of. Fixes: http://tracker.ceph.com/issues/17762 Signed-off-by: Kefu Chai <kchai@redhat.com>
* Fixed problem with isal-regular gzip compatibility.Adam Kupczyk2016-11-021-0/+68
| | | | | | Added tests. Signed-off-by: Adam Kupczyk <akupczyk@mirantis.com>
* os/bluestore: share compression/csum enums and corresponding stuff for ↵Igor Fedotov2016-10-191-1/+1
| | | | | | common use Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
* compressor/ZLibCompressor: fix broken isal-lIgor Fedotov2016-10-121-1/+1
| | | | Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
* unittest_compression: naming nitSage Weil2016-10-071-22/+22
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* unittest_compression: restore zlib_isal settingSage Weil2016-10-071-0/+8
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* unittest_compression: subsume plugin testSage Weil2016-10-063-82/+23
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* unittest_compression: subsume _zlib and _snappy test casesSage Weil2016-10-064-395/+199
| | | | | | This includes zlib and isal interop. Signed-off-by: Sage Weil <sage@redhat.com>
* unittest_compressor: smaller big testSage Weil2016-10-061-1/+1
| | | | | | Just so it runs a bit faster! Signed-off-by: Sage Weil <sage@redhat.com>
* compressor/zlib: disable ISA-LSage Weil2016-10-061-1/+1
| | | | | | This fails the unit tests. Do not reenable until it is fixed! Signed-off-by: Sage Weil <sage@redhat.com>
* compressor/zlib: add compressor_zlib_isal config option to disable ISA-LSage Weil2016-10-061-2/+23
| | | | | | | We dynamically enable this if the necessary processor features are present. Allow this probing to be disabled explicitly. Signed-off-by: Sage Weil <sage@redhat.com>
* unittest_compressor: unified compression tests, parameterized by pluginSage Weil2016-10-064-130/+161
| | | | | | This obsoletes the per-plugin plugin tests, which are tedious anyway. Signed-off-by: Sage Weil <sage@redhat.com>
* unittest_compression_*: remove lib dir hackerySage Weil2016-09-263-22/+6
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* tetst/compression_zlib: add simple benchmarkPiotr Dałek2016-09-171-2/+86
| | | | | | | Simple benchmark testing performance of 1024, 2048, 4096, 8192 and 16384 byte block compression and decompression. Signed-off-by: Piotr Dałek <git@predictor.org.pl>
* common/compressor: fix improper length value passed to zlib compressorIgor Fedotov2016-09-141-4/+31
| | | | Signed-off-by: Igor Fedotov <ifedotovo@miranitis.com>
* remove autotoolsSage Weil2016-09-071-76/+0
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* os/bluestore: get rid off "isa-l" type in ZLibCompressor ctorxie xingguo2016-08-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is introduced by https://github.com/ceph/ceph/pull/10158 and causes the following failure: /home/xxg/ceph-dev/src/os/bluestore/bluestore_types.h: 284: FAILED assert(0 == "invalid compression algorithm") ceph version v11.0.0-1941-g47c8a21 (47c8a214356983f0539f24fe1c5724b3bbae0406) 1: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x85) [0x7f5668c1ad45] 2: (BlueStore::_do_alloc_write(BlueStore::TransContext*, BlueStore::WriteContext*)+0x1a65) [0x7f5668b19d55] 3: (BlueStore::_do_write(BlueStore::TransContext*, boost::intrusive_ptr<BlueStore::Collection>&, boost::intrusive_ptr<BlueStore::Onode>, unsigned long, unsigned long, ceph::buffer::list&, unsigned int)+0x4ac) [0x7f5668b3b3fc] 4: (BlueStore::_write(BlueStore::TransContext*, boost::intrusive_ptr<BlueStore::Collection>&, boost::intrusive_ptr<BlueStore::Onode>&, unsigned long, unsigned long, ceph::buffer::list&, unsigned int)+0x10f) [0x7f5668b3bf2f] 5: (BlueStore::_txc_add_transaction(BlueStore::TransContext*, ObjectStore::Transaction*)+0x1067) [0x7f5668b405f7] 6: (BlueStore::queue_transactions(ObjectStore::Sequencer*, std::vector<ObjectStore::Transaction, std::allocator<ObjectStore::Transaction> >&, std::shared_ptr<TrackedOp>, ThreadPool::TPHandle*)+0x382) [0x7f5668b42432] 7: (SyntheticWorkloadState::write()+0x3a5) [0x7f5668a2ace5] 8: (doSyntheticTest(boost::scoped_ptr<ObjectStore>&, unsigned long, unsigned long, unsigned long)+0xb9d) [0x7f56689dfa7d] 9: (do_matrix_choose(char const* (*) [10], int, int, int, boost::scoped_ptr<ObjectStore>&)+0x29d) [0x7f56689dfffd] 10: (do_matrix_choose(char const* (*) [10], int, int, int, boost::scoped_ptr<ObjectStore>&)+0x9e) [0x7f56689dfdfe] 11: (do_matrix_choose(char const* (*) [10], int, int, int, boost::scoped_ptr<ObjectStore>&)+0x9e) [0x7f56689dfdfe] 12: (do_matrix_choose(char const* (*) [10], int, int, int, boost::scoped_ptr<ObjectStore>&)+0x9e) [0x7f56689dfdfe] 13: (do_matrix_choose(char const* (*) [10], int, int, int, boost::scoped_ptr<ObjectStore>&)+0x9e) [0x7f56689dfdfe] 14: (do_matrix_choose(char const* (*) [10], int, int, int, boost::scoped_ptr<ObjectStore>&)+0x9e) [0x7f56689dfdfe] 15: (do_matrix(char const* (*) [10], boost::scoped_ptr<ObjectStore>&)+0x317) [0x7f56689e0347] 16: (()+0x297f3c) [0x7f56689e0f3c] 17: (StoreTest_SyntheticMatrixCompressionAlgorithm_Test::TestBody()+0x118) [0x7f56689e1078] 18: (void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*)+0x43) [0x7f5668d673e3] 19: (testing::Test::Run()+0xb7) [0x7f5668d5a127] 20: (testing::TestInfo::Run()+0x9e) [0x7f5668d5a1ce] 21: (testing::TestCase::Run()+0xa5) [0x7f5668d5a2d5] 22: (testing::internal::UnitTestImpl::RunAllTests()+0x278) [0x7f5668d5a5b8] 23: (testing::UnitTest::Run()+0x68) [0x7f5668d5a888] 24: (main()+0x2f4) [0x7f566895be84] 25: (__libc_start_main()+0xf5) [0x7f5663e5ab15] 26: (()+0x265ba5) [0x7f56689aeba5] NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this. Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
* compressor: isa-l extension for zlib pluginVed-vampir2016-08-082-5/+90
| | | | Signed-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
* Merge pull request #9782 from Ved-vampir/zlib_cleanupKefu Chai2016-07-151-5/+5
|\ | | | | | | | | compressor: zlib compressor plugin cleanup Reviewed-by: Kefu Chai <kchai@redhat.com>
| * compressor: zlib compressor plugin cleanupVed-vampir2016-06-171-5/+5
| | | | | | | | Signed-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
* | test: test_{compression_plugin,async_compressor}: do not copy pluginsKefu Chai2016-07-061-8/+0
| | | | | | | | | | | | | | | | | | do not copy plugins in unittest_{compression_plugin,async_compressor} anymore. 42c640e searches in conf->plugin_dir also, if conf->plugin_dir/$type does not have the requested plugin. Signed-off-by: Kefu Chai <kchai@redhat.com>
* | cmake: do not exclude tests from 'make all'Sage Weil2016-06-231-5/+5
|/ | | | | | | | This prevent us from doing 'make' and then 'ctest ...'. It is also super annoying in general to not verify the tests compile with a simple 'make'. Signed-off-by: Sage Weil <sage@redhat.com>
* compressor: Extends decompressor interface to be able to provide compressed ↵Igor Fedotov2016-06-013-4/+18
| | | | | | data length. Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
* compressor: add a get_type() method to Compressor interfaceSage Weil2016-06-013-9/+5
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* compressor: Refactor to allow bufferlist::iterator as an inputIgor Fedotov2016-06-012-1/+6
| | | | Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
* compressor: tests for zlib & snappy changesAli Maredia2016-05-022-8/+0
| | | | | | | | plugin_dir and compressor_dir not needed by test_compression_snappy & test_compression_zlib because they statically link compressor libraries. Signed-off-by: Ali Maredia <amaredia@redhat.com>
* cmake: CEPH_LIB defaults to .libs in cpp unit testsAli Maredia2016-05-025-6/+6
| | | | | | | | | | This makes it possible to run applicable unit tests without setting environment varibles after building with autotools. This will be reverted once autotools is deprecated. Signed-off-by: Ali Maredia <amaredia@redhat.com>
* cmake: fix linking of compressor and pluginsCasey Bodley2016-04-291-46/+9
| | | | | | | | | libcommon now includes the compressor objects necessary to load compressor plugins also removed extra dependencies on the plugins and their unit tests Signed-off-by: Casey Bodley <cbodley@redhat.com>
* cmake: Protect againist getenv returning nullptrAli Maredia2016-04-155-8/+21
| | | | Signed-off-by: Ali Maredia <amaredia@redhat.com>
* cmake: moved tests into test/compressor dirAli Maredia2016-04-155-10/+97
| | | | | | | | | Added a CMakeLists.txt into test/compressor, libcompressor to src/compressor/CMakeLists.txt, added absolute path into $snappy_sources, removed .libs from compressor unit test source files Signed-off-by: Ali Maredia <amaredia@redhat.com>
* unittest_compression_zlib: do not assume buffer will be null terminatedSage Weil2016-03-111-2/+6
| | | | Signed-off-by: Sage Weil <sage@redhat.com>
* unittest_compression_[*_][plugin]: fix warningsSage Weil2016-02-114-8/+14
| | | | | | | | | | | | test/compressor/test_compression_plugin.cc: In function ‘int main(int, char**)’: test/compressor/test_compression_plugin.cc:55:38: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] system("mkdir -p .libs/compressor"); ^ test/compressor/test_compression_plugin.cc:56:59: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] system("cp .libs/libceph_example.so* .libs/compressor/"); ^ Signed-off-by: Sage Weil <sage@redhat.com>
* Merge pull request #7437 from Ved-vampir/wip_zlib_pluginSage Weil2016-02-083-0/+160
|\ | | | | | | | | common: add zlib compression plugin Reviewed-by: Sage Weil <sage@redhat.com>
| * Compressor: add zlib unittestsVed-vampir2016-02-013-0/+160
| | | | | | | | Signed-off-by: Alyona Kiseleva <akiselyova@mirantis.com>
* | make ctors with one argument explicitDanny Al-Gaaf2016-01-291-1/+1
|/ | | | | | | Use explicit keyword for constructors with one argument to prevent implicit usage as conversion functions. Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
* Fixes #14400 + some refactoring to avoid input buffer modification in future.Igor Fedotov2016-01-182-3/+35
| | | | Signed-off-by: Igor Fedotov <ifedotov@mirantis.com>
* Compressor: compressor plugins unit testsVed-vampir2016-01-156-0/+350
Signed-off-by: Alyona Kiseleva <akiselyova@mirantis.com>