]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
test/osd/TestRados: add parameter max-attr-len
authorXuehan Xu <xuxuehan@qianxin.com>
Mon, 11 Mar 2024 08:38:54 +0000 (16:38 +0800)
committerMatan Breizman <mbreizma@redhat.com>
Thu, 13 Jun 2024 12:23:53 +0000 (15:23 +0300)
SeaStore can't handle too big attributes

Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit 45a6d3f2c7fd5281a398b08762849fd37488ac21)

src/test/osd/RadosModel.h
src/test/osd/TestRados.cc

index 1e5d0e908bc14129b6f12ef3c04a2556df1fb6d2..8bb94e7f3a0494f1c78e1bdd5ff141ff6b662400 100644 (file)
@@ -215,6 +215,7 @@ public:
                   bool enable_dedup,
                   std::string chunk_algo,
                   std::string chunk_size,
+                  size_t max_attr_len,
                   const char *id = 0) :
     pool_obj_cont(),
     current_snap(0),
@@ -226,7 +227,7 @@ public:
     rados_id(id), initialized(false),
     max_size(max_size), 
     min_stride_size(min_stride_size), max_stride_size(max_stride_size),
-    attr_gen(2000, 20000),
+    attr_gen(2000, max_attr_len),
     no_omap(no_omap),
     no_sparse(no_sparse),
     pool_snaps(pool_snaps),
index 1a1389b2a1881494aab1b1c510c2797d880ba839..876b5eb8dd7441d77674640cd5524c881dcc1873 100644 (file)
@@ -523,6 +523,7 @@ int main(int argc, char **argv)
   bool enable_dedup = false;
   string chunk_algo = "";
   string chunk_size = "";
+  size_t max_attr_len = 20000;
 
 
   for (int i = 1; i < argc; ++i) {
@@ -554,6 +555,8 @@ int main(int argc, char **argv)
       pool_snaps = true;
     else if (strcmp(argv[i], "--write-fadvise-dontneed") == 0)
       write_fadvise_dontneed = true;
+    else if (strcmp(argv[i], "--max-attr-len") == 0)
+      max_attr_len = atoi(argv[++i]);
     else if (strcmp(argv[i], "--ec-pool") == 0) {
       if (!op_weights.empty()) {
        cerr << "--ec-pool must be specified prior to any ops" << std::endl;
@@ -700,6 +703,7 @@ int main(int argc, char **argv)
     enable_dedup,
     chunk_algo,
     chunk_size,
+    max_attr_len,
     id);
 
   TestOpStat stats;