[4/4] btrfs-progs: tests: add 020-bad-free-space-cache
diff mbox

Message ID 1463456878-17550-5-git-send-email-quwenruo@cn.fujitsu.com
State New
Headers show

Commit Message

Qu Wenruo May 17, 2016, 3:47 a.m. UTC
From: Lu Fengqi <lufq.fnst@cn.fujitsu.com>

To test if fsck can detect and clear free space cache error

Signed-off-by: Lu Fengqi <lufq.fnst@cn.fujitsu.com>
---
 .../020-bad-free-space-cache/default_case.raw.xz       | Bin 0 -> 164068 bytes
 tests/fsck-tests/020-bad-free-space-cache/test.sh      |  16 ++++++++++++++++
 2 files changed, 16 insertions(+)
 create mode 100644 tests/fsck-tests/020-bad-free-space-cache/default_case.raw.xz
 create mode 100755 tests/fsck-tests/020-bad-free-space-cache/test.sh

Patch
diff mbox

diff --git a/tests/fsck-tests/020-bad-free-space-cache/default_case.raw.xz b/tests/fsck-tests/020-bad-free-space-cache/default_case.raw.xz
new file mode 100644
index 0000000000000000000000000000000000000000..5e08de426c5cc5faa9ccd430432b9c37f4e072ff
GIT binary patch
literal 164068
zcmeI*^;eeNx-amDR-{2nC8RqA>6GpeDQQIM6j137K{}*Cq@`OL1t~!~M5R-@W$!We
zIOF`V&KY~XYi!^3uDve)0mhimoY%ZQ-#PF5zTo$Kpoc)9E{#>mAS0-eh!F^c3&&#4
z<)trbl_3IQe{p%4Q+p{ZDtFyUz(l<+hH)t;2;*dHfx>Tuqf1a2NwM6kCoD{vBL{oZ
z`^}FC8hp)pUD7Vsu<uWgYvR1Ip0v)n$eSCaSBJdBN_`NcP7sOhaA5g3U!?SMuA9Bf
z=J>r{jDvPxtx%!Tkbo_rhU;xZv758eDW_e=+Pb&X`q?vkT5awf>N;|gam?{2x9MLE
zeUp;lr*CIb@fnr#*(qs|p<(vVd;4f8MEO5zWo@Q=@)kZ7RJb_c+Q(T_uQqFn<0z&{
zRGX_fa*CJuia9>py^$1!^-5Lr7m~=)Rm^x<fu!nL?P(fiqPF8Oma6swvWTp#OAgh?
zbtBKky9&QG)$5xZa`=zue|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0gZr0
zKqH_L&<JP*Gy)m{jetf#BcKr}&<JP*Gy)m{jetf#BcKt`2xtT}0vZ90fJV4LBcKt`
z2xtT}0vZ90fJQ(gpb^jrXaqC@8tDU#fJQ(gpb^jrXaqC@8Uc-fMnEH=5zq)|v;{N*
z8Uc-fMnEH=5zq)|1T+E~0gZr0KqH`0Ezk&P1T+E~0gZr0KqH_L&<JP*Gy)m{jethi
zfJQ(gpb^jrXaqC@8Uc-fMnEH=5zq)|1T;DW8Uc-fMnEH=5zq)|1T+E~0gZr0KqH_L
z(C8J=2xtT}0vZ90fJQ(gpb^jrXaqC@8Uc-fMn*s*pb^jrXaqC@8Uc-fMnEH=5zq)|
z1T+E~SptoKMnEH=5zq)|1T+E~0gZr0KqH_L&<JRB1T+E~0gZr0KqH_L&<JP*Gy)m{
zjetf#BcPE5&<JP*Gy)m{jetf#BcKt`2xtT}0vZ90fJW6oBcKt`2xtT}0vZ90fJQ(g
zpb^jrXaqC@8ZiKkfJQ(gpb^jrXaqC@8Uc-fMnEH=5zy#Qp^@)27J>w^;jEc|@xJsq
z7kS2i^<k1#z7jtWh~6*HJ5mhg$`D9RzL-A$`G<-?_%qw15RnLRq9FeB4^>z1KLA`Q
B&L#i=

literal 0
HcmV?d00001

diff --git a/tests/fsck-tests/020-bad-free-space-cache/test.sh b/tests/fsck-tests/020-bad-free-space-cache/test.sh
new file mode 100755
index 0000000..8524d2a
--- /dev/null
+++ b/tests/fsck-tests/020-bad-free-space-cache/test.sh
@@ -0,0 +1,16 @@ 
+#!/bin/bash
+
+source $TOP/tests/common
+
+check_prereq btrfs
+
+image=$(extract_image "./default_case.raw.xz")
+run_check_stdout $TOP/btrfs check "$image" |\
+	grep -q "csum mismatch on free space cache" ||\
+	_fail "btrfs check didn't detect free space cache error"
+run_check $TOP/btrfs check --clear-space-cache "$image"
+run_check_stdout $TOP/btrfs check "$image" 2>&1 |
+	grep -q "csum mismatch on free space cache" &&
+	_fail "unexpected error message in the output"
+
+rm -f "$image"