2016-03-20 14:34:10 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# test commands of btrfs
|
|
|
|
|
2023-04-19 15:08:41 +00:00
|
|
|
source "$TEST_TOP/common" || exit
|
2016-03-20 14:34:10 +00:00
|
|
|
|
|
|
|
check_prereq btrfs
|
|
|
|
|
|
|
|
# returns 1
|
2024-06-17 22:11:11 +00:00
|
|
|
run_mayfail "$TOP/btrfs" || true
|
2017-01-24 16:59:47 +00:00
|
|
|
run_check "$TOP/btrfs" version
|
|
|
|
run_check "$TOP/btrfs" version --
|
|
|
|
run_check "$TOP/btrfs" help
|
|
|
|
run_check "$TOP/btrfs" help --
|
|
|
|
run_check "$TOP/btrfs" help --full
|
|
|
|
run_check "$TOP/btrfs" --help
|
|
|
|
run_check "$TOP/btrfs" --help --full
|
|
|
|
run_check "$TOP/btrfs" --version
|
|
|
|
run_check "$TOP/btrfs" --version --help
|
2023-12-01 00:30:45 +00:00
|
|
|
|
|
|
|
# Log levels
|
|
|
|
run_check "$TOP/btrfs" --log=default help
|
|
|
|
run_check "$TOP/btrfs" --log=info help
|
|
|
|
run_check "$TOP/btrfs" -vv help
|
|
|
|
run_check "$TOP/btrfs" --log=verbose help
|
|
|
|
run_check "$TOP/btrfs" -vvv help
|
|
|
|
run_check "$TOP/btrfs" --log=debug help
|
|
|
|
run_check "$TOP/btrfs" -vvvv help
|
|
|
|
run_check "$TOP/btrfs" --log=quiet help
|
|
|
|
run_check "$TOP/btrfs" -q help
|
|
|
|
run_mustfail "invalid log level accepted" "$TOP/btrfs" --log=invalid help
|