test: Avoid issues with names starting with dashes

Shellcheck emmits the following warning:
SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options.

Which seems like a fair recommendation.

Signed-off-by: Julien Thierry <jthierry@redhat.com>
This commit is contained in:
Julien Thierry 2020-06-03 09:07:10 +01:00
parent 22d1046412
commit 4dd55cd407
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ if [[ ! -d $OBJDIR ]]; then
fi
cd "$OBJDIR" || exit 1
for i in $(find * -name '*.o')
for i in $(find ./* -name '*.o')
do
# copied from kpatch-build/kpatch-gcc; keep in sync
case $i in
@ -81,7 +81,7 @@ rm -f "$TEMPDIR/log.txt" > /dev/null 2>&1
cd "$RESULTSDIR" || exit 1
echo ""
echo "Results:"
for i in $(find * -iname '*.log')
for i in $(find ./* -iname '*.log')
do
echo $(cat $i | head -1 | cut -f2-3 -d':')
done | sort | uniq -c | sort -n -r | tee "$TEMPDIR/results.log"

View File

@ -49,7 +49,7 @@ KPATCHBUILD="$ROOTDIR"/kpatch-build/kpatch-build
ERROR=0
LOG=test.log
DYNDEBUG_CONTROL=/sys/kernel/debug/dynamic_debug/control
rm -f *.log
rm -f ./*.log
PATCHDIR="${PATCHDIR:-$PWD}"
declare -a PATCH_LIST