This fixes the potential problems reported by github-code-scan.
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
TS_TOPDIR="${0%/*}/../.."
TS_DESC="ainodeclass column"
-. $TS_TOPDIR/functions.sh
+. "$TS_TOPDIR"/functions.sh
ts_init "$*"
ts_check_test_command "$TS_CMD_LSFD"
{
for C in pidfd inotify; do
coproc MKFDS { "$TS_HELPER_MKFDS" $C $FD ; }
- if read -u ${MKFDS[0]} PID; then
+ if read -r -u "${MKFDS[0]}" PID; then
${TS_CMD_LSFD} -n -o ASSOC,STTYPE,AINODECLASS -p "${PID}" -Q "${EXPR}"
echo "$C"':ASSOC,STTYPE,AINODECLASS': $?
- kill -CONT ${PID}
- wait ${MKFDS_PID}
+ kill -CONT "${PID}"
+ wait "${MKFDS_PID}"
fi
done
-} > $TS_OUTPUT 2>&1
+} > "$TS_OUTPUT" 2>&1
ts_finalize
TS_TOPDIR="${0%/*}/../.."
TS_DESC="NAME and KNAME column"
-. $TS_TOPDIR/functions.sh
+. "$TS_TOPDIR"/functions.sh
ts_init "$*"
ts_check_test_command "$TS_CMD_LSFD"
esac
"$TS_HELPER_MKFDS" $C $FD ${argv}
}
- if read -u ${MKFDS[0]} PID; then
+ if read -r -u "${MKFDS[0]}" PID; then
${TS_CMD_LSFD} -n -o ASSOC,KNAME,NAME -p "${PID}" -Q "${EXPR}" | {
# Replace the unpredictable an inode number for the socket
# with "INODENUM".
}
echo "$C"':ASSOC,KNAME,NAME': $?
- kill -CONT ${PID}
- wait ${MKFDS_PID}
+ kill -CONT "${PID}"
+ wait "${MKFDS_PID}"
fi
done
-} > $TS_OUTPUT 2>&1
+} > "$TS_OUTPUT" 2>&1
ts_finalize
TS_TOPDIR="${0%/*}/../.."
TS_DESC="TYPE and STTYPE column"
-. $TS_TOPDIR/functions.sh
+. "$TS_TOPDIR"/functions.sh
ts_init "$*"
ts_check_test_command "$TS_CMD_LSFD"
esac
"$TS_HELPER_MKFDS" $C $FD ${argv}
}
- if read -u ${MKFDS[0]} PID; then
+ if read -r -u "${MKFDS[0]}" PID; then
${TS_CMD_LSFD} -n -o ASSOC,STTYPE,TYPE -p "${PID}" -Q "${EXPR}"
echo "$C"':ASSOC,STTYPE,TYPE': $?
- kill -CONT ${PID}
- wait ${MKFDS_PID}
+ kill -CONT "${PID}"
+ wait "${MKFDS_PID}"
fi
done
-} > $TS_OUTPUT 2>&1
+} > "$TS_OUTPUT" 2>&1
ts_finalize