Add regression test for UUID change

This commit is contained in:
Andrea Mazzoleni 2015-12-04 22:38:43 +01:00
parent cab1b43d3b
commit fcc3894667
4 changed files with 16 additions and 0 deletions

View file

@ -1271,6 +1271,11 @@ static void state_map(struct snapraid_state* state)
continue;
}
if (state->opt.fake_uuid) {
snprintf(uuid, sizeof(uuid), "fake-uuid-%d", state->opt.fake_uuid);
--state->opt.fake_uuid;
}
/* if the uuid is changed */
if (strcmp(uuid, map->uuid) != 0) {
/* mark the disk as with an UUID change */