|
|
594167 |
From 494045e03c7e1b81ac4dcea7d4bf776e2bc50c77 Mon Sep 17 00:00:00 2001
|
|
|
594167 |
From: Frantisek Sumsal <frantisek@sumsal.cz>
|
|
|
594167 |
Date: Thu, 10 Feb 2022 12:29:53 +0100
|
|
|
594167 |
Subject: [PATCH] test: accept GC'ed units in newer LVM
|
|
|
594167 |
|
|
|
594167 |
Since lvm 2.03.15 the transient units are started without `-r`, thus
|
|
|
594167 |
disappearing once they finish and breaking the test (which expects them
|
|
|
594167 |
to remain loaded after finishing). Let's accept `LoadState=not-found` as
|
|
|
594167 |
a valid result as well to fix this.
|
|
|
594167 |
|
|
|
594167 |
Follow-up to: d10d562bd4b9f93130fb2b23f2b0d0d4126ea7d4
|
|
|
594167 |
See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=fbd8b0cf43dc67f51f86f060dce748f446985855
|
|
|
594167 |
|
|
|
594167 |
(cherry picked from commit b034f02c628057c30a2136289a1b388a6fb9a737)
|
|
|
594167 |
|
|
|
594167 |
Related: #2017035
|
|
|
594167 |
---
|
|
|
594167 |
test/units/testsuite-64.sh | 8 ++++++++
|
|
|
594167 |
1 file changed, 8 insertions(+)
|
|
|
594167 |
|
|
|
594167 |
diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh
|
|
|
594167 |
index f75382d90a..dc8b263b10 100755
|
|
|
594167 |
--- a/test/units/testsuite-64.sh
|
|
|
594167 |
+++ b/test/units/testsuite-64.sh
|
|
|
594167 |
@@ -96,6 +96,14 @@ helper_wait_for_lvm_activate() {
|
|
|
594167 |
if [[ "$(systemctl show -P SubState "$lvm_activate_svc")" == exited ]]; then
|
|
|
594167 |
return 0
|
|
|
594167 |
fi
|
|
|
594167 |
+ else
|
|
|
594167 |
+ # Since lvm 2.03.15 the lvm-activate transient unit no longer remains
|
|
|
594167 |
+ # after finishing, so we have to treat non-existent units as a success
|
|
|
594167 |
+ # as well
|
|
|
594167 |
+ # See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=fbd8b0cf43dc67f51f86f060dce748f446985855
|
|
|
594167 |
+ if [[ "$(systemctl show -P LoadState "$lvm_activate_svc")" == not-found ]]; then
|
|
|
594167 |
+ return 0
|
|
|
594167 |
+ fi
|
|
|
594167 |
fi
|
|
|
594167 |
|
|
|
594167 |
sleep .5
|