]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
tests: (uuidd) fix various shellcheck warnings
authorChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 29 Jan 2026 12:55:48 +0000 (07:55 -0500)
committerChristian Goeschel Ndjomouo <cgoesc2@wgu.edu>
Thu, 29 Jan 2026 12:55:48 +0000 (07:55 -0500)
Signed-off-by: Christian Goeschel Ndjomouo <cgoesc2@wgu.edu>
tests/ts/uuidd/uuidd

index afc1121c2b707a2a1a1df8c44aca9e4df65e4bd1..a768b5a2fefc78eb12ca00f13861e9b75f8901d7 100755 (executable)
@@ -32,16 +32,16 @@ if [ $? -ne 0 ]; then
 fi
 
 test_flag() {
-       echo "options: $*" >> $TS_OUTPUT
-       $TS_CMD_UUIDD -s $UUIDD_SOCKET $* |
-               sed '/List of UUIDs:/d; s/^[[:space:]]*//' > "$OUTPUT_FILE" 2>>$TS_OUTPUT
-       $TS_HELPER_UUID_PARSER "$OUTPUT_FILE" >> $TS_OUTPUT 2>> $TS_ERRLOG
+       echo "options: $*" >> "$TS_OUTPUT"
+       $TS_CMD_UUIDD -s "$UUIDD_SOCKET" "$@" |
+               sed '/List of UUIDs:/d; s/^[[:space:]]*//' > "$OUTPUT_FILE" 2>>"$TS_OUTPUT"
+       $TS_HELPER_UUID_PARSER "$OUTPUT_FILE" >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
        ret=$?
        if [ $ret -ne 0 ]; then
-               echo "something wrong with $OUTPUT_FILE" >> $TS_OUTPUT
-               cat $OUTPUT_FILE >> $TS_OUTPUT 2>> $TS_ERRLOG
+               echo "something wrong with $OUTPUT_FILE" >> "$TS_OUTPUT"
+               cat "$OUTPUT_FILE" >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
        fi
-       echo "return value: $ret" >> $TS_OUTPUT
+       echo "return value: $ret" >> "$TS_OUTPUT"
 }
 
 test_flag -t
@@ -50,9 +50,9 @@ test_flag -r
 test_flag --random
 test_flag -r -n 65
 
-$TS_CMD_UUIDD -k -s "$UUIDD_SOCKET" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_UUIDD -k -s "$UUIDD_SOCKET" >> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
 
-sed -i 's/pid [0-9]*.$/pid <num>./' $TS_OUTPUT $TS_ERRLOG
+sed -i 's/pid [0-9]*.$/pid <num>./' "$TS_OUTPUT" "$TS_ERRLOG"
 
 rm -f "$OUTPUT_FILE" "$UUIDD_PID" "$UUIDD_SOCKET"