2021-09-20 09:45:56 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Test parsing of option 'defrag -c'
|
|
|
|
|
2023-04-19 15:08:41 +00:00
|
|
|
source "$TEST_TOP/common" || exit
|
2021-09-20 09:45:56 +00:00
|
|
|
|
|
|
|
setup_root_helper
|
|
|
|
prepare_test_dev
|
|
|
|
|
|
|
|
run_check_mkfs_test_dev
|
|
|
|
run_check_mount_test_dev
|
|
|
|
run_check $SUDO_HELPER dd if=/dev/zero of="$TEST_MNT"/file bs=1M count=1
|
|
|
|
run_check $SUDO_HELPER "$TOP/btrfs" filesystem defrag -v -c "$TEST_MNT/file"
|
|
|
|
run_check $SUDO_HELPER "$TOP/btrfs" filesystem defrag -v -clzo "$TEST_MNT/file"
|
|
|
|
run_check $SUDO_HELPER "$TOP/btrfs" filesystem defrag -v -czlib "$TEST_MNT/file"
|
|
|
|
run_check $SUDO_HELPER "$TOP/btrfs" filesystem defrag -v -czstd "$TEST_MNT/file"
|
|
|
|
run_check_umount_test_dev
|