forked from Mirrors/btrfs-progs
btrfs-progs: tests: remove trivial use of local variables
No need to use a temporary variable if the parameter usage is obvious from the context. Signed-off-by: David Sterba <dsterba@suse.com>master
parent
a1e21ec5a8
commit
a855717a87
|
@ -10,10 +10,7 @@ source "$TEST_TOP/common"
|
|||
check_prereq btrfs
|
||||
|
||||
check_image() {
|
||||
local image
|
||||
|
||||
image=$1
|
||||
run_check "$TOP/btrfs" check "$image"
|
||||
run_check "$TOP/btrfs" check "$1"
|
||||
}
|
||||
|
||||
check_all_images
|
||||
|
|
|
@ -20,10 +20,7 @@ source "$TEST_TOP/common"
|
|||
check_prereq btrfs
|
||||
|
||||
check_image() {
|
||||
local image
|
||||
|
||||
image=$1
|
||||
run_check "$TOP/btrfs" check "$image"
|
||||
run_check "$TOP/btrfs" check "$1"
|
||||
}
|
||||
|
||||
check_all_images
|
||||
|
|
|
@ -9,10 +9,7 @@ check_prereq btrfs
|
|||
|
||||
# redefine the one provided by common
|
||||
check_image() {
|
||||
local image
|
||||
|
||||
image=$1
|
||||
run_mayfail "$TOP/btrfs" check "$image"
|
||||
run_mayfail "$TOP/btrfs" check "$1"
|
||||
}
|
||||
|
||||
check_all_images "$TEST_TOP/fuzz-tests/images"
|
||||
|
|
|
@ -9,11 +9,8 @@ check_prereq btrfs-image
|
|||
|
||||
# redefine the one provided by common
|
||||
check_image() {
|
||||
local image
|
||||
|
||||
image=$1
|
||||
truncate -s0 target
|
||||
run_mayfail "$TOP/btrfs-image" "$image" target
|
||||
run_mayfail "$TOP/btrfs-image" "$1" target
|
||||
truncate -s0 target
|
||||
}
|
||||
|
||||
|
|
|
@ -7,10 +7,7 @@ check_prereq btrfs
|
|||
|
||||
# redefine the one provided by common
|
||||
check_image() {
|
||||
local image
|
||||
|
||||
image=$1
|
||||
run_mayfail "$TOP/btrfs" inspect-internal dump-tree "$image"
|
||||
run_mayfail "$TOP/btrfs" inspect-internal dump-tree "$1"
|
||||
}
|
||||
|
||||
check_all_images "$TEST_TOP/fuzz-tests/images"
|
||||
|
|
|
@ -7,10 +7,7 @@ check_prereq btrfs
|
|||
|
||||
# redefine the one provided by common
|
||||
check_image() {
|
||||
local image
|
||||
|
||||
image=$1
|
||||
run_mayfail "$TOP/btrfs" inspect-internal tree-stats "$image"
|
||||
run_mayfail "$TOP/btrfs" inspect-internal tree-stats "$1"
|
||||
}
|
||||
|
||||
check_all_images "$TEST_TOP/fuzz-tests/images"
|
||||
|
|
|
@ -10,10 +10,7 @@ check_prereq btrfs
|
|||
prepare_test_dev
|
||||
|
||||
get_fs_uuid() {
|
||||
local image
|
||||
|
||||
image="$1"
|
||||
run_check_stdout $TOP/btrfs inspect-internal dump-super "$image" | \
|
||||
run_check_stdout $TOP/btrfs inspect-internal dump-super "$1" | \
|
||||
grep '^fsid' | awk '{print $2}'
|
||||
}
|
||||
|
||||
|
|
|
@ -9,17 +9,11 @@ prepare_test_dev
|
|||
|
||||
get_log_root()
|
||||
{
|
||||
local image
|
||||
|
||||
image="$1"
|
||||
$TOP/btrfs inspect-internal dump-super "$image" | \
|
||||
$TOP/btrfs inspect-internal dump-super "$1" | \
|
||||
grep '^log_root\>' | awk '{print $2}'
|
||||
}
|
||||
get_log_root_level() {
|
||||
local image
|
||||
|
||||
image="$1"
|
||||
$TOP/btrfs inspect-internal dump-super "$image" | \
|
||||
$TOP/btrfs inspect-internal dump-super "$1" | \
|
||||
grep '^log_root_level' | awk '{print $2}'
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue