Skip to content

Commit 45a6d3f

Browse files
committed
test/osd/TestRados: add parameter max-attr-len
SeaStore can't handle too big attributes Signed-off-by: Xuehan Xu <[email protected]>
1 parent 57106ce commit 45a6d3f

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/test/osd/RadosModel.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ class RadosTestContext {
215215
bool enable_dedup,
216216
std::string chunk_algo,
217217
std::string chunk_size,
218+
size_t max_attr_len,
218219
const char *id = 0) :
219220
pool_obj_cont(),
220221
current_snap(0),
@@ -226,7 +227,7 @@ class RadosTestContext {
226227
rados_id(id), initialized(false),
227228
max_size(max_size),
228229
min_stride_size(min_stride_size), max_stride_size(max_stride_size),
229-
attr_gen(2000, 20000),
230+
attr_gen(2000, max_attr_len),
230231
no_omap(no_omap),
231232
no_sparse(no_sparse),
232233
pool_snaps(pool_snaps),

src/test/osd/TestRados.cc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,7 @@ int main(int argc, char **argv)
523523
bool enable_dedup = false;
524524
string chunk_algo = "";
525525
string chunk_size = "";
526+
size_t max_attr_len = 20000;
526527

527528

528529
for (int i = 1; i < argc; ++i) {
@@ -554,6 +555,8 @@ int main(int argc, char **argv)
554555
pool_snaps = true;
555556
else if (strcmp(argv[i], "--write-fadvise-dontneed") == 0)
556557
write_fadvise_dontneed = true;
558+
else if (strcmp(argv[i], "--max-attr-len") == 0)
559+
max_attr_len = atoi(argv[++i]);
557560
else if (strcmp(argv[i], "--ec-pool") == 0) {
558561
if (!op_weights.empty()) {
559562
cerr << "--ec-pool must be specified prior to any ops" << std::endl;
@@ -700,6 +703,7 @@ int main(int argc, char **argv)
700703
enable_dedup,
701704
chunk_algo,
702705
chunk_size,
706+
max_attr_len,
703707
id);
704708

705709
TestOpStat stats;

0 commit comments

Comments
 (0)