From 1e15369e59faf92b1efcf4b68d099fb4418b73de Mon Sep 17 00:00:00 2001 From: David Esparza Date: Wed, 2 Aug 2023 12:23:09 -0600 Subject: [PATCH] metrics: Improve naming testing containers in launch times test This commit provides a new way to name the containers used in the launch-times-test in this form: 'kata_launch_times_RANDOM_NUMBER', where RANDOM_NUMBER is in the 0-1000 range. Fixes: #7529 Signed-off-by: David Esparza --- tests/metrics/time/launch_times.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/metrics/time/launch_times.sh b/tests/metrics/time/launch_times.sh index 0458b979ed..3d6b98e348 100755 --- a/tests/metrics/time/launch_times.sh +++ b/tests/metrics/time/launch_times.sh @@ -96,6 +96,7 @@ run_workload() { # number of decimal digits after the decimal points # for 'bc' performing math in kernel period estimation L_CALC_SCALE=13 + local CONTAINER_NAME="kata_launch_times_$(( $RANDOM % 1000 + 1))" start_time=$($DATECMD) # Check entropy level of the host @@ -103,8 +104,7 @@ run_workload() { # Run the image and command and capture the results into an array... declare workload_result - readarray -n 0 workload_result < <(sudo -E "${CTR_EXE}" run --rm --runtime=${CTR_RUNTIME} ${IMAGE} test bash -c "$DATECMD $DMESGCMD") - + readarray -n 0 workload_result < <(sudo -E "${CTR_EXE}" run --rm --runtime ${CTR_RUNTIME} ${IMAGE} ${CONTAINER_NAME} bash -c "$DATECMD $DMESGCMD") end_time=$($DATECMD) # Delay this calculation until after we have run - do not want