mirror of
https://github.com/kdave/btrfs-progs
synced 2024-12-17 20:05:24 +00:00
btrfs-progs: tests: warning and timeout when removing multiple devices
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
9e55abfd77
commit
c0592c5591
29
tests/cli-tests/023-device-delete-force/test.sh
Executable file
29
tests/cli-tests/023-device-delete-force/test.sh
Executable file
@ -0,0 +1,29 @@
|
||||
#!/bin/bash
|
||||
# Test multiple devices for removal, timeout and warning
|
||||
|
||||
source "$TEST_TOP/common" || exit
|
||||
|
||||
setup_root_helper
|
||||
setup_loopdevs 4
|
||||
prepare_loopdevs
|
||||
TEST_DEV=${loopdevs[1]}
|
||||
|
||||
# Print warning and wait
|
||||
run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f -d raid1 -m raid1 "${loopdevs[@]}"
|
||||
run_check_mount_test_dev
|
||||
run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT"/file bs=100M count=1
|
||||
run_check "$TOP/btrfs" filesystem usage -T "$TEST_MNT"
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" device delete "${loopdevs[3]}" "${loopdevs[2]}" "$TEST_MNT"
|
||||
run_check "$TOP/btrfs" filesystem usage -T "$TEST_MNT"
|
||||
run_check_umount_test_dev
|
||||
|
||||
# Print warning and skip waiting
|
||||
run_check $SUDO_HELPER "$TOP/mkfs.btrfs" -f -d raid1 -m raid1 "${loopdevs[@]}"
|
||||
run_check_mount_test_dev
|
||||
run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT"/file bs=100M count=1
|
||||
run_check "$TOP/btrfs" filesystem usage -T "$TEST_MNT"
|
||||
run_check $SUDO_HELPER "$TOP/btrfs" device delete --force "${loopdevs[3]}" "${loopdevs[2]}" "$TEST_MNT"
|
||||
run_check "$TOP/btrfs" filesystem usage -T "$TEST_MNT"
|
||||
run_check_umount_test_dev
|
||||
|
||||
cleanup_loopdevs
|
Loading…
Reference in New Issue
Block a user