From 56c46c7e11b69ef8926a00ae0e947529ec19249b Mon Sep 17 00:00:00 2001 From: Antti Kervinen Date: Fri, 1 Nov 2024 14:28:38 +0200 Subject: [PATCH] e2e: fix command filenames in test output directories %04g-target formatting resulted in filenames like -1.0329e+121-vm in some environments. As COMMAND_COUNTER is a natural number, let us format it using %d for consistent results. Signed-off-by: Antti Kervinen --- test/e2e/lib/command.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/e2e/lib/command.bash b/test/e2e/lib/command.bash index 5f8f4130f..790a43804 100644 --- a/test/e2e/lib/command.bash +++ b/test/e2e/lib/command.bash @@ -29,7 +29,7 @@ command-start() { COMMAND_COUNTER=$(( COMMAND_COUNTER + 1 )) local command_start_time=$(epochrealtime) local time_since_start=$(echo "$command_start_time - $command_init_time" | bc) - COMMAND_OUT_FILE="$COMMAND_OUTPUT_DIR/$(printf %04g $COMMAND_COUNTER)-$COMMAND_TARGET" + COMMAND_OUT_FILE="$COMMAND_OUTPUT_DIR/$(printf %04d $COMMAND_COUNTER)-$COMMAND_TARGET" echo "# start time: $time_since_start" > "$COMMAND_OUT_FILE" || { echo "cannot write command output to file \"$COMMAND_OUT_FILE\"" exit 1