#!/bin/bash - # libguestfs # Copyright (C) 2012 Red Hat Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # Test btrfs adding/removing devices. # # This test is intended to try and abuse btrfs by writing lots of data # to the disk, then instructing btrfs to move the data between # devices. set -e guestfish=../../fish/guestfish # Allow the test to be skipped since btrfs is often broken. if [ -n "$SKIP_TEST_BTRFS_DEVICES_SH" ]; then echo "$0: skipping test because environment variable is set." exit 77 fi # If btrfs is not available, bail. if ! $guestfish -a /dev/null run : available btrfs; then echo "$0: skipping test because btrfs is not available" exit 77 fi rm -f test[1234].img $guestfish <