You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support uses conditionally compiled implementations from spdk
and ISA-L.
Validated against SPDK test vectors and one example generated and
passed via awscliv2 (AWS SDK) version 2.24.5.
Restored the ability of unittest_rgw_cksum to create a binary input
file for external checksum testing, but only when requested via
cmdline option.
Fixes: https://tracker.ceph.com/issues/70040
Signed-off-by: Matt Benjamin <[email protected]>
Copy file name to clipboardExpand all lines: src/test/rgw/test_rgw_cksum.cc
+84-2Lines changed: 84 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -36,6 +36,7 @@ namespace {
36
36
usingnamespacergw::cksum;
37
37
38
38
bool verbose = false;
39
+
bool gen_test_data = false;
39
40
40
41
cksum::Type t1 = cksum::Type::blake3;
41
42
cksum::Type t2 = cksum::Type::sha1;
@@ -51,6 +52,24 @@ namespace {
51
52
std::string dolor =
52
53
R"(Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.)";
53
54
55
+
TEST(RGWCksum, Output)
56
+
{
57
+
if (gen_test_data) {
58
+
auto o_mode = std::ios::out|std::ios::trunc;
59
+
std::ofstream of;
60
+
61
+
std::cout << "writing lorem text to /tmp/lorem " << std::endl;
62
+
of.open("/tmp/lorem", o_mode);
63
+
of << lorem;
64
+
of.close();
65
+
66
+
std::cout << "writing dolor text to /tmp/dolor " << std::endl;
0 commit comments