diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-04-25 19:42:01 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-04-25 19:42:26 +0100 |
commit | 2d414112f7439d3f5b1b56b2392ab080c961f90c (patch) | |
tree | 04b997de6773a7ac8d6afd83ee2b94b4563ed5ae /tests | |
parent | 12c5394d4cb379890c9c69c16d1d735674a2e80d (diff) | |
download | libguestfs-2d414112f7439d3f5b1b56b2392ab080c961f90c.tar.gz libguestfs-2d414112f7439d3f5b1b56b2392ab080c961f90c.tar.xz libguestfs-2d414112f7439d3f5b1b56b2392ab080c961f90c.zip |
btrfs: Enhance the btrfs device test.
This enhances commit 87ea7a04094d5ed40f3f047ff2b7a613d4d530d4.
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/btrfs/test-btrfs-devices.sh | 39 |
1 files changed, 37 insertions, 2 deletions
diff --git a/tests/btrfs/test-btrfs-devices.sh b/tests/btrfs/test-btrfs-devices.sh index ea1c8817..38ffcd51 100755 --- a/tests/btrfs/test-btrfs-devices.sh +++ b/tests/btrfs/test-btrfs-devices.sh @@ -17,6 +17,10 @@ # 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 @@ -44,11 +48,42 @@ part-disk /dev/sdd mbr mkfs-btrfs "/dev/sda1 /dev/sdb1" mount /dev/sda1 / -mkdir /foo -touch /foo/bar +mkdir /data1 +txz-in ../data/filesanddirs-10M.tar.xz /data1 + +# Uncommenting the next two lines shows filesystem errors. +# Reported upstream as RHBZ#816304. +#btrfs-filesystem-sync / +#dmesg + +btrfs-device-add "/dev/sdc1 /dev/sdd1" / +btrfs-device-delete "/dev/sda1 /dev/sdb1" / +btrfs-device-add "/dev/sda1 /dev/sdb1" / +btrfs-device-delete "/dev/sdc1 /dev/sdd1" / + +mkdir /data2 +txz-in ../data/filesanddirs-10M.tar.xz /data2 + +btrfs-device-add "/dev/sdc1 /dev/sdd1" / +btrfs-device-delete "/dev/sda1 /dev/sdb1" / +btrfs-device-add "/dev/sda1 /dev/sdb1" / +btrfs-device-delete "/dev/sdc1 /dev/sdd1" / + +mkdir /data3 +txz-in ../data/filesanddirs-10M.tar.xz /data3 + +btrfs-device-add "/dev/sdc1 /dev/sdd1" / +btrfs-device-delete "/dev/sda1 /dev/sdb1" / +btrfs-device-add "/dev/sda1 /dev/sdb1" / +btrfs-device-delete "/dev/sdc1 /dev/sdd1" / + +mkdir /data4 +txz-in ../data/filesanddirs-10M.tar.xz /data4 btrfs-device-add "/dev/sdc1 /dev/sdd1" / btrfs-device-delete "/dev/sda1 /dev/sdb1" / +btrfs-device-add "/dev/sda1 /dev/sdb1" / +btrfs-device-delete "/dev/sdc1 /dev/sdd1" / EOF |