1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-30 17:18:21 +03:00

lvconvert: no metadata for test mode

Avoid trying to build real metadata in --test mode.
This commit is contained in:
Zdenek Kabelac 2023-07-14 11:39:04 +02:00
parent 93484c2a62
commit bdcfd2d730

View File

@ -497,6 +497,11 @@ int thin_pool_prepare_metadata(struct logical_volume *metadata_lv,
return 0;
}
if (test_mode()) {
log_verbose("Test mode: Skipping creation of provisioned thin pool metadata.");
return 1;
}
/* coverity[secure_temp] until better solution */
if (!(f = tmpfile())) {
log_error("Cannot create temporary file to prepare metadata.");