From: Christian Goeschel Ndjomouo Date: Thu, 29 Jan 2026 12:55:48 +0000 (-0500) Subject: tests: (uuidd) fix various shellcheck warnings X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95b273708ffbaf7f44043ab55f903625a1a8c3e6;p=thirdparty%2Futil-linux.git tests: (uuidd) fix various shellcheck warnings Signed-off-by: Christian Goeschel Ndjomouo --- diff --git a/tests/ts/uuidd/uuidd b/tests/ts/uuidd/uuidd index afc1121c2..a768b5a2f 100755 --- a/tests/ts/uuidd/uuidd +++ b/tests/ts/uuidd/uuidd @@ -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 ./' $TS_OUTPUT $TS_ERRLOG +sed -i 's/pid [0-9]*.$/pid ./' "$TS_OUTPUT" "$TS_ERRLOG" rm -f "$OUTPUT_FILE" "$UUIDD_PID" "$UUIDD_SOCKET"