aboutsummaryrefslogtreecommitdiffstats
path: root/check
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2022-07-08 10:51:40 +0200
committerZorro Lang <zlang@kernel.org>2022-07-09 01:13:22 +0800
commit5c31ba9b72991dcf6f26931b646ae17b3ebeef72 (patch)
tree75ddddd8c4ea13366bd5118212a2c7f06b895e01 /check
parente47930fb73bcfe9c046fa5bb01ae293bbca559f9 (diff)
downloadxfstests-dev-5c31ba9b72991dcf6f26931b646ae17b3ebeef72.tar.gz
check: make a few variables local
The variables aren't used outside of function scope. Also convert one timestamp output to use the helper. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Zorro Lang <zlang@kernel.org>
Diffstat (limited to 'check')
-rwxr-xr-xcheck10
1 files changed, 5 insertions, 5 deletions
diff --git a/check b/check
index dbad6dde2e..08857f7ee9 100755
--- a/check
+++ b/check
@@ -179,10 +179,10 @@ get_all_tests()
# the function from that list.
trim_test_list()
{
- test_list="$*"
+ local test_list="$*"
rm -f $tmp.grep
- numsed=0
+ local numsed=0
for t in $test_list
do
if [ $numsed -gt 100 ]; then
@@ -207,7 +207,7 @@ _wallclock()
_timestamp()
{
- now=`date "+%T"`
+ local now=`date "+%T"`
echo -n " [$now]"
}
@@ -603,7 +603,7 @@ fi
function run_section()
{
- local section=$1
+ local section=$1 skip
OLD_FSTYP=$FSTYP
OLD_TEST_FS_MOUNT_OPTS=$TEST_FS_MOUNT_OPTS
@@ -820,7 +820,7 @@ function run_section()
rm -f core $seqres.notrun
start=`_wallclock`
- $timestamp && echo -n " ["`date "+%T"`"]"
+ $timestamp && _timestamp
[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
$LOGGER_PROG "run xfstest $seqnum"
if [ -w /dev/kmsg ]; then