[11/11] btrfs-progs: misc-tests/034: add new test images and modify the script
diff mbox series

Message ID 20191212110204.11128-12-Damenly_Su@gmx.com
State New
Headers show
Series
  • btrfs-progs: metadata_uuid feature fixes and portation
Related show

Commit Message

Damenly Su Dec. 12, 2019, 11:02 a.m. UTC
From: Su Yue <Damenly_Su@gmx.com>

Disk7 contains an image which has undergone a successful fsid change
more than once with FSID_CHANGING_v2 flag. disk8 on the other hand is
member of the same filesystem but has completed its last change without
METADATA_UUID flag set.

The expected recovery result is both image don't have FSID_CHANGING_v2
and INCOMPAT_METADATA_UUID. Change the test script to test it.

NOTE: It needs kernel fixes for metadata_uuid feature, otherwise
will fail.

Signed-off-by: Su Yue <Damenly_Su@gmx.com>
---
 .../misc-tests/034-metadata-uuid/disk7.raw.xz | Bin 0 -> 48388 bytes
 .../misc-tests/034-metadata-uuid/disk8.raw.xz | Bin 0 -> 47084 bytes
 tests/misc-tests/034-metadata-uuid/test.sh    |  38 +++++++++++++++---
 3 files changed, 32 insertions(+), 6 deletions(-)
 create mode 100644 tests/misc-tests/034-metadata-uuid/disk7.raw.xz
 create mode 100644 tests/misc-tests/034-metadata-uuid/disk8.raw.xz

Patch
diff mbox series

diff --git a/tests/misc-tests/034-metadata-uuid/disk7.raw.xz b/tests/misc-tests/034-metadata-uuid/disk7.raw.xz
new file mode 100644
index 0000000000000000000000000000000000000000..157815fd1f87039f81d0f7fbfe6888b8bac96b85
GIT binary patch
literal 48388
zcmeHQc{tSl`kt{9F&L7_QiyCJ*<M+)RLDM-LWohwT10kDw#*P?&t7S=R9eYe%9^Z`
zb&y>uX@qfludZ|buJdy`Z*$(}T>kj@dtBeS?zx})d7k@uKA-QpVj#jA0-<@|b6<xF
zA_(0Dfk4>W5iJ`VduWg+ArQ~?jg9<=8@hk!!M&9nj2~gd-seZtuPlu7hrg9>R91x^
zE5H0ICdNQIpQS&fXe>?`W;$ZEqtP#haDiBv9K!5YGvur9WSd8S$X6#8m85UU@O*oI
z2aEBC`33l_bFPH~f0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
HcmV?d00001

diff --git a/tests/misc-tests/034-metadata-uuid/disk8.raw.xz b/tests/misc-tests/034-metadata-uuid/disk8.raw.xz
new file mode 100644
index 0000000000000000000000000000000000000000..ec1fa6709348b713368d3afb6ba8b741e3eec582
GIT binary patch
literal 47084
zcmeI5_g7PE7KTqKSE`{Z(o|5Xp@<D5h^P^`SO7($RB7TMAVn@xEvN($P?4qq<;GA2
zMWiSY1VIG?iXgoxz3U}P3z=DWX05qvO_&h}gdcYPfvmO9{@(qZcki=5`qpzM#}I_A
zyY2~&1zC#{M-YUs%A|t9;9$j>A&4`b!AQtv?9<c{c2&1B$hjfgop5>C#BitNg&O6T
z+jpRTedPC=K-jOGz}w*e;L|l}exr80$V(5xN6+!6xBPidQCi(~ZA|0+uVj6SJE$kZ
z=!tzQN%e_;m#~-SF;;AFh@YfEq*|j(mNhsO#$t4}Q(DaLrD`{BcJg-DciSDNXe>dn
z`81fXB;$u^9gtFJU?=w}ObcQ41qJs$ptAAiXt(IgB_)XxEKaPq;^61&Pio^@`^6^Y
za&Lm&l@KC!O4rQm6vNnub@Zxnfl$D2wK1af)v9ZnJC;`}p1f9Dl_bU{cqt+<d#pnK
zKyuLtH@VUO+xAOmJ1z{2d>d_jjJb5fT&#ARA@-Cq%O@$4JS}?v7gfGe-JF_%AUW3^
z4td^Pg(vUSIXj!8L<WK!NO5Y7hAPSh)-jK~Q-hwwd4}_<YhSp9s#@_9uZ4tWtvYr@
zy(9m=rm?M`&RDg(@x?oAP8InLy@a$#3`1!kMk0^;NJhjIf4R@j(4?U6Y%0F9>o_~d
zL|J3n^pv53d!^*@HQEy`MjGRCHk{aia(TzLEbM4WzLG^UTJu*s?J&XR48EJ=XMV$v
zb5}AVWO3+3MzfihveL)*UZ%Zo(>0Pz1}_a|`Z!b>h7F}k*6D5cBI?^}CYp)WS3X#s
z@yh6UKyPuKWd_ZYW#)JGGn}P@V%@{}JRDQGvi4=x{6^aLrwsbtS><+{92xS~QlsgW
z6xe@09o?2?zk!w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Iz4d
z3g8Oh3g8Oh3g8Oh3g8Oh3gBw8P&>3?wqlMxF$4?(wy^IfkYSKvkYTX;7FOTF>Ra%`
zW_tsMDhX8*sw7lNsFF}6p-MuPoF|_cumZ3GumZ3GumZ3GumZ3GuwrrA&%j~8VZdR)
zVZdR)VZdR)VZdR)VLqy&aoHg-6g-<6z&GD>WM&B14+JcLKtZ_vyliZG$f=4niXdD;
l5h)Ck{U!ueJi-zX5O5oXAo>2)Dncu<Dy+yqer)(-e+NJhvxxuz

literal 0
HcmV?d00001

diff --git a/tests/misc-tests/034-metadata-uuid/test.sh b/tests/misc-tests/034-metadata-uuid/test.sh
index 5fe553705fcf..9c6fe101cf7a 100755
--- a/tests/misc-tests/034-metadata-uuid/test.sh
+++ b/tests/misc-tests/034-metadata-uuid/test.sh
@@ -145,19 +145,34 @@  check_inprogress_flag() {
 }
 
 check_completed() {
+	local metadata_uuid="$3"
+
 	# check that metadata uuid is indeed completed
 	run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super \
 		"$1" | grep -q METADATA_UUID
-	[ $? -eq 0 ] || _fail "metadata_uuid not set on $1"
+	if [ $? -ne 0 -a "$metadata_uuid" = 'true' ] ; then
+		_fail "metadata_uuid not set on $1"
+	elif [  $? -eq 0 -a "$metadata_uuid" = 'false' ] ; then
+		_fail "metadata_uuid set on $1"
+	fi
 
 	run_check_stdout $SUDO_HELPER "$TOP/btrfs" inspect-internal dump-super \
-		"$2" | grep -q METADATA_UUID
-	[ $? -eq 0 ] || _fail "metadata_uuid not set on $2"
+		 "$2" | grep -q METADATA_UUID
+	if [ $? -ne 0 -a "$metadata_uuid" = 'true' ] ; then
+		_fail "metadata_uuid not set on $2"
+	elif [  $? -eq 0 -a "$metadata_uuid" = 'false' ] ; then
+		_fail "metadata_uuid set on $2"
+	fi
 }
 
 check_multi_fsid_change() {
 	check_inprogress_flag "$1" "$2"
-	check_completed "$1" "$2"
+	check_completed "$1" "$2" true
+}
+
+check_multi_fsid_change_without_metadata_uuid() {
+	check_inprogress_flag "$1" "$2"
+	check_completed "$1" "$2" false
 }
 
 failure_recovery() {
@@ -217,9 +232,9 @@  failure_recovery "./disk2.raw.xz" "./disk1.raw.xz" check_inprogress_flag
 # of the same filesystem but has both METADATA_UUID incompat and a new
 # metadata uuid set. So disk 3 must always take precedence
 reload_btrfs
-failure_recovery "./disk3.raw.xz" "./disk4.raw.xz" check_completed
+failure_recovery "./disk3.raw.xz" "./disk4.raw.xz" check_completed true
 reload_btrfs
-failure_recovery "./disk4.raw.xz" "./disk3.raw.xz" check_completed
+failure_recovery "./disk4.raw.xz" "./disk3.raw.xz" check_completed true
 
 # disk5 contains an image which has undergone a successful fsid change more
 # than once, disk6 on the other hand is member of the same filesystem but
@@ -229,3 +244,14 @@  reload_btrfs
 failure_recovery "./disk5.raw.xz" "./disk6.raw.xz" check_multi_fsid_change
 reload_btrfs
 failure_recovery "./disk6.raw.xz" "./disk5.raw.xz" check_multi_fsid_change
+
+# disk7 contains an image which has undergone a successful fsid change more
+# than once with FSID_CHANGING flag. disk8 on the other hand is member
+# of the same filesystem but has completed its last change without
+# METADATA_UUID flag set.
+reload_btrfs
+failure_recovery "./disk7.raw.xz" "./disk8.raw.xz" \
+		 check_multi_fsid_change_without_metadata_uuid
+reload_btrfs
+failure_recovery "./disk8.raw.xz" "./disk7.raw.xz" \
+		 check_multi_fsid_change_without_metadata_uuid