2016-05-30 02:58:13 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# In order to confirm that btrfsck supports to check a variety of refs, add the
|
|
|
|
# following cases:
|
|
|
|
#
|
|
|
|
# * keyed_block_ref
|
|
|
|
# * keyed_data_ref
|
|
|
|
# * shared_block_ref
|
|
|
|
# * shared_data_ref
|
|
|
|
# * no_inline_ref (a extent item without inline ref)
|
|
|
|
# * no_skinny_ref
|
2017-02-21 08:34:34 +00:00
|
|
|
#
|
|
|
|
# Special check for lowmem regression
|
|
|
|
# * block_group_item_false_alert
|
|
|
|
# Containing a block group and its first extent at
|
|
|
|
# the beginning of leaf.
|
|
|
|
# Which caused false alert for lowmem mode.
|
2016-05-30 02:58:13 +00:00
|
|
|
|
2017-04-24 13:29:40 +00:00
|
|
|
source "$TOP/tests/common"
|
2016-05-30 02:58:13 +00:00
|
|
|
|
|
|
|
check_prereq btrfs
|
|
|
|
|
2017-02-21 08:34:34 +00:00
|
|
|
for img in *.img *.raw.xz
|
2016-05-30 02:58:13 +00:00
|
|
|
do
|
2017-04-24 13:29:40 +00:00
|
|
|
image=$(extract_image "$img")
|
2017-02-21 08:34:34 +00:00
|
|
|
|
|
|
|
# Since the return value bug is already fixed, we don't need
|
|
|
|
# the old grep hack to detect bug.
|
2017-04-24 13:29:40 +00:00
|
|
|
run_check "$TOP/btrfs" check "$image"
|
2016-05-30 02:58:13 +00:00
|
|
|
rm -f "$image"
|
|
|
|
done
|