From bdcfd2d730a0e2c715529a7050c4015a2f049b88 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 14 Jul 2023 11:39:04 +0200 Subject: [PATCH] lvconvert: no metadata for test mode Avoid trying to build real metadata in --test mode. --- lib/metadata/thin_manip.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c index f4b52bd96..492a7dbd2 100644 --- a/lib/metadata/thin_manip.c +++ b/lib/metadata/thin_manip.c @@ -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.");