Compressor,
CompressorTest,
::testing::Values(
+#ifdef __x86_64__
"zlib/isal",
+#endif
"zlib/noisal",
"snappy",
"zstd"));
+#ifdef __x86_64__
+
TEST(ZlibCompressor, zlib_isal_compatibility)
{
g_conf->set_val("compressor_zlib_isal", "true");
g_ceph_context->_conf->apply_changes(NULL);
CompressorRef isal = Compressor::create(g_ceph_context, "zlib");
+ if (!isal) {
+ // skip the test if the plugin is not ready
+ return;
+ }
g_conf->set_val("compressor_zlib_isal", "false");
g_ceph_context->_conf->apply_changes(NULL);
CompressorRef zlib = Compressor::create(g_ceph_context, "zlib");
exp.append(test);
EXPECT_TRUE(exp.contents_equal(after));
}
+#endif
TEST(CompressionPlugin, all)
{
}
}
+#ifdef __x86_64__
+
TEST(ZlibCompressor, isal_compress_zlib_decompress_random)
{
g_conf->set_val("compressor_zlib_isal", "true");
g_ceph_context->_conf->apply_changes(NULL);
CompressorRef isal = Compressor::create(g_ceph_context, "zlib");
+ if (!isal) {
+ // skip the test if the plugin is not ready
+ return;
+ }
g_conf->set_val("compressor_zlib_isal", "false");
g_ceph_context->_conf->apply_changes(NULL);
CompressorRef zlib = Compressor::create(g_ceph_context, "zlib");
g_conf->set_val("compressor_zlib_isal", "true");
g_ceph_context->_conf->apply_changes(NULL);
CompressorRef isal = Compressor::create(g_ceph_context, "zlib");
+ if (!isal) {
+ // skip the test if the plugin is not ready
+ return;
+ }
g_conf->set_val("compressor_zlib_isal", "false");
g_ceph_context->_conf->apply_changes(NULL);
CompressorRef zlib = Compressor::create(g_ceph_context, "zlib");
EXPECT_TRUE(exp.contents_equal(after));
}
}
+
+#endif // __x86_64__