Skip to content

Commit

Permalink
sheep/vdi: Fix fill_vdi_state_list() to set 'deleted' member
Browse files Browse the repository at this point in the history
Fixes sheepdog#234

Signed-off-by: Takashi Menjo <menjo.takashi@lab.ntt.co.jp>
  • Loading branch information
tmenjo committed Apr 22, 2016
1 parent 0bbaeaf commit 8721bb3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions sheep/vdi.c
Expand Up @@ -424,6 +424,7 @@ int fill_vdi_state_list(const struct sd_req *hdr,
vs[last].vid = entry->vid;
vs[last].nr_copies = entry->nr_copies;
vs[last].snapshot = entry->snapshot;
vs[last].deleted = entry->deleted;
vs[last].copy_policy = entry->copy_policy;
vs[last].block_size_shift = entry->block_size_shift;
vs[last].lock_state = entry->lock_state;
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/sheep/test_vdi.c
Expand Up @@ -69,7 +69,7 @@ static void test_fill_vdi_state_list_should_set_deleted(void)
TEST_ASSERT_EQUAL_UINT8(0, state.copy_policy);
TEST_ASSERT_EQUAL_UINT8(22, state.block_size_shift);
TEST_ASSERT_EQUAL_UINT32(0, state.parent_vid);
TEST_ASSERT_TRUE(state.deleted); /* FAIL */
TEST_ASSERT_TRUE(state.deleted);
}

int main(void)
Expand Down

0 comments on commit 8721bb3

Please sign in to comment.