// old image should fail
ASSERT_EQ(0, create_image(&ioctx, "old", 33<<20, 22, 0, "old_blk."));
- // this next test is no longer valid after 56bc369983e197d29496eb75bc3f7b9b05d98bf6
- // ASSERT_EQ(-ENOEXEC, get_parent(&ioctx, "old", CEPH_NOSNAP, &pspec, &size));
+ // get nonexistent parent: succeed, return (-1, "", CEPH_NOSNAP), overlap 0
+ ASSERT_EQ(0, get_parent(&ioctx, "old", CEPH_NOSNAP, &pspec, &size));
+ ASSERT_EQ(pspec.pool_id, -1);
+ ASSERT_STREQ("", pspec.image_id.c_str());
+ ASSERT_EQ(pspec.snap_id, CEPH_NOSNAP);
+ ASSERT_EQ(size, 0ULL);
pspec = parent_spec(-1, "parent", 3);
ASSERT_EQ(-ENOEXEC, set_parent(&ioctx, "old", parent_spec(-1, "parent", 3), 10<<20));
ASSERT_EQ(-ENOEXEC, remove_parent(&ioctx, "old"));