From: Zdenek Kabelac Date: Fri, 23 Dec 2016 11:52:45 +0000 (+0100) Subject: tests: update test X-Git-Tag: v2_02_169~515 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=96a1943fb8d208aa84c386cf48f2b62038b09e2e;p=lvm2.git tests: update test lvm2 now correctly reports thin_id after action of merged thin, but before physical metadata update as we know the merge has happened. --- diff --git a/test/shell/thin-vglock.sh b/test/shell/thin-vglock.sh index e59636dc3..40f3adf2e 100644 --- a/test/shell/thin-vglock.sh +++ b/test/shell/thin-vglock.sh @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2014 Red Hat, Inc. All rights reserved. +# Copyright (C) 2014-2016 Red Hat, Inc. All rights reserved. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions @@ -37,15 +37,24 @@ check lv_field $vg/snap thin_id "3" lvconvert --merge $vg/snap umount mnt + +check lv_field $vg/$lv1 thin_id "1" +check lv_field $vg/pool transaction_id "3" + vgchange -an $vg # Check reboot case vgchange -ay --sysinit $vg -# Metadata are still not updated (--poll n) -check lv_field $vg/$lv1 thin_id "1" + +# Check correct thin_id is shown after activation +# even when metadata were not yet physically modified. +# Merge take its place during activation, +# but pool transaction_id still needs metadata update. +check lv_field $vg/$lv1 thin_id "3" check lv_field $vg/pool transaction_id "3" # Check the metadata are updated after refresh +# vgchange --refresh $vg check lv_field $vg/$lv1 thin_id "3" check lv_field $vg/pool transaction_id "4"