summaryrefslogtreecommitdiff
path: root/tests/misc-tests
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2018-03-23 16:21:37 +0100
committerDavid Sterba <dsterba@suse.com>2018-03-30 22:15:55 +0200
commita855717a87a8da78b62148e8bf0a629695596097 (patch)
treebf4606be59922453b284350bf8121907fc705a4f /tests/misc-tests
parenta1e21ec5a880044f44a9109633c7503bce02cb5e (diff)
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>
Diffstat (limited to 'tests/misc-tests')
-rwxr-xr-xtests/misc-tests/002-uuid-rewrite/test.sh5
-rwxr-xr-xtests/misc-tests/003-zero-log/test.sh10
2 files changed, 3 insertions, 12 deletions
diff --git a/tests/misc-tests/002-uuid-rewrite/test.sh b/tests/misc-tests/002-uuid-rewrite/test.sh
index e32aff0c..8e7011a8 100755
--- a/tests/misc-tests/002-uuid-rewrite/test.sh
+++ b/tests/misc-tests/002-uuid-rewrite/test.sh
@@ -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}'
}
diff --git a/tests/misc-tests/003-zero-log/test.sh b/tests/misc-tests/003-zero-log/test.sh
index 9d2940f5..51cf6ae4 100755
--- a/tests/misc-tests/003-zero-log/test.sh
+++ b/tests/misc-tests/003-zero-log/test.sh
@@ -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}'
}