Skip to content

Commit 548e252

Browse files
authored
Merge pull request ceph#63933 from tchaikov/wip-rbd-cls_rbd_snap
cls/rbd: use default values for non-decoded fields in test instances Reviewed-by: Ilya Dryomov <[email protected]>
2 parents ed2b694 + a329b00 commit 548e252

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/cls/rbd/cls_rbd.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -227,17 +227,17 @@ struct cls_rbd_snap {
227227

228228
static void generate_test_instances(std::list<cls_rbd_snap*>& o) {
229229
o.push_back(new cls_rbd_snap{});
230+
// the parent field is ignored in v8 and up, so let's avoid setting it.
231+
// otherwise check-generated.sh would fail due to the disprepancies between
232+
// the original dump and re-encoded dump
230233
o.push_back(new cls_rbd_snap{1, "snap", 123456,
231-
RBD_PROTECTION_STATUS_PROTECTED,
232-
{{1, "", "image", 123}, 234}, 31, {},
234+
RBD_PROTECTION_STATUS_PROTECTED, {}, 31, {},
233235
cls::rbd::UserSnapshotNamespace{}, 543, {}});
234236
o.push_back(new cls_rbd_snap{1, "snap", 123456,
235-
RBD_PROTECTION_STATUS_PROTECTED,
236-
{{1, "", "image", 123}, 234}, 31, {},
237+
RBD_PROTECTION_STATUS_PROTECTED, {}, 31, {},
237238
cls::rbd::UserSnapshotNamespace{}, 543, {0}});
238239
o.push_back(new cls_rbd_snap{1, "snap", 123456,
239-
RBD_PROTECTION_STATUS_PROTECTED,
240-
{{1, "ns", "image", 123}, 234}, 31, {},
240+
RBD_PROTECTION_STATUS_PROTECTED, {}, 31, {},
241241
cls::rbd::UserSnapshotNamespace{}, 543,
242242
{123}});
243243
}

0 commit comments

Comments
 (0)