The command btrfs-show-super is not supposed to be distributed but
was useful for testing. The same functionality is now present as
'btrfs inspect-internal dump-super', let's detect which one is
available and use it in btrfs/011 that fails with btrfs-progs 4.8.4+
Signed-off-by: David Sterba <dsterba@suse.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
touch ${RESULT_DIR}/require_scratch.require_qgroup_report
}
+_require_btrfs_dump_super()
+{
+ if [ ! -x "$BTRFS_SHOW_SUPER_PROG" ]; then
+ _require_command "$BTRFS_UTIL_PROG" btrfs
+ if ! $BTRFS_UTIL_PROG inspect-internal dump-super --help >& /dev/null; then
+ _notrun "Missing btrfs-show-super or inspect-internal dump-super"
+ fi
+ BTRFS_SHOW_SUPER_PROG="$BTRFS_UTIL_PROG inspect-internal dump-super"
+ fi
+}
+
_run_btrfs_util_prog()
{
run_check $BTRFS_UTIL_PROG $*
_supported_fs btrfs
_require_scratch_nocheck
_require_scratch_dev_pool 4
-_require_command "$BTRFS_SHOW_SUPER_PROG" btrfs-show-super
+_require_btrfs_dump_super
rm -f $seqres.full
rm -f $tmp.tmp