From: Frantisek Sumsal Date: Thu, 10 Feb 2022 11:29:53 +0000 (+0100) Subject: test: accept GC'ed units in newer LVM X-Git-Tag: v251-rc1~313 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b034f02c628057c30a2136289a1b388a6fb9a737;p=thirdparty%2Fsystemd.git test: accept GC'ed units in newer LVM Since lvm 2.03.15 the transient units are started without `-r`, thus disappearing once they finish and breaking the test (which expects them to remain loaded after finishing). Let's accept `LoadState=not-found` as a valid result as well to fix this. Follow-up to: d10d562bd4b9f93130fb2b23f2b0d0d4126ea7d4 See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=fbd8b0cf43dc67f51f86f060dce748f446985855 --- diff --git a/test/units/testsuite-64.sh b/test/units/testsuite-64.sh index f75382d90a6..dc8b263b100 100755 --- a/test/units/testsuite-64.sh +++ b/test/units/testsuite-64.sh @@ -96,6 +96,14 @@ helper_wait_for_lvm_activate() { if [[ "$(systemctl show -P SubState "$lvm_activate_svc")" == exited ]]; then return 0 fi + else + # Since lvm 2.03.15 the lvm-activate transient unit no longer remains + # after finishing, so we have to treat non-existent units as a success + # as well + # See: https://sourceware.org/git/?p=lvm2.git;a=commit;h=fbd8b0cf43dc67f51f86f060dce748f446985855 + if [[ "$(systemctl show -P LoadState "$lvm_activate_svc")" == not-found ]]; then + return 0 + fi fi sleep .5