diff --git a/test/benchmark/iperf3/tcp_virtio_bw/host.sh b/test/benchmark/iperf3/tcp_virtio_bw/host.sh index 9c61a2fb..5f8912bf 100755 --- a/test/benchmark/iperf3/tcp_virtio_bw/host.sh +++ b/test/benchmark/iperf3/tcp_virtio_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/memcached/t16_conc64_window10k/host.sh b/test/benchmark/memcached/t16_conc64_window10k/host.sh index 681eb92d..7caf45af 100644 --- a/test/benchmark/memcached/t16_conc64_window10k/host.sh +++ b/test/benchmark/memcached/t16_conc64_window10k/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/memcached/t8_conc32_window10k/host.sh b/test/benchmark/memcached/t8_conc32_window10k/host.sh index dab79035..411d5aea 100644 --- a/test/benchmark/memcached/t8_conc32_window10k/host.sh +++ b/test/benchmark/memcached/t8_conc32_window10k/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/memcached/t8_conc32_window20k/host.sh b/test/benchmark/memcached/t8_conc32_window20k/host.sh index 9aa37551..9cd6262b 100644 --- a/test/benchmark/memcached/t8_conc32_window20k/host.sh +++ b/test/benchmark/memcached/t8_conc32_window20k/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/nginx/http_file16KB_bw/host.sh b/test/benchmark/nginx/http_file16KB_bw/host.sh index ff6d4428..74ece790 100644 --- a/test/benchmark/nginx/http_file16KB_bw/host.sh +++ b/test/benchmark/nginx/http_file16KB_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/nginx/http_file32KB_bw/host.sh b/test/benchmark/nginx/http_file32KB_bw/host.sh index aabd10e5..e595922c 100644 --- a/test/benchmark/nginx/http_file32KB_bw/host.sh +++ b/test/benchmark/nginx/http_file32KB_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/nginx/http_file4KB_bw/host.sh b/test/benchmark/nginx/http_file4KB_bw/host.sh index 7cf609bd..1f054062 100644 --- a/test/benchmark/nginx/http_file4KB_bw/host.sh +++ b/test/benchmark/nginx/http_file4KB_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/nginx/http_file64KB_bw/host.sh b/test/benchmark/nginx/http_file64KB_bw/host.sh index ec9e945e..a629162b 100644 --- a/test/benchmark/nginx/http_file64KB_bw/host.sh +++ b/test/benchmark/nginx/http_file64KB_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/nginx/http_file8KB_bw/host.sh b/test/benchmark/nginx/http_file8KB_bw/host.sh index 5417bba8..a1c713a7 100644 --- a/test/benchmark/nginx/http_file8KB_bw/host.sh +++ b/test/benchmark/nginx/http_file8KB_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/nginx/http_req10k_conc1_bw/host.sh b/test/benchmark/nginx/http_req10k_conc1_bw/host.sh index f5bd3803..19fbd55b 100755 --- a/test/benchmark/nginx/http_req10k_conc1_bw/host.sh +++ b/test/benchmark/nginx/http_req10k_conc1_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/nginx/http_req10k_conc20_bw/host.sh b/test/benchmark/nginx/http_req10k_conc20_bw/host.sh index a3a7de67..2d81bbc4 100755 --- a/test/benchmark/nginx/http_req10k_conc20_bw/host.sh +++ b/test/benchmark/nginx/http_req10k_conc20_bw/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/redis/get_100k_conc20_rps/host.sh b/test/benchmark/redis/get_100k_conc20_rps/host.sh index 753aab37..32eb3cb8 100755 --- a/test/benchmark/redis/get_100k_conc20_rps/host.sh +++ b/test/benchmark/redis/get_100k_conc20_rps/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/redis/ping_inline_100k_conc20_rps/host.sh b/test/benchmark/redis/ping_inline_100k_conc20_rps/host.sh index 4e2d124e..b67b7499 100755 --- a/test/benchmark/redis/ping_inline_100k_conc20_rps/host.sh +++ b/test/benchmark/redis/ping_inline_100k_conc20_rps/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/redis/ping_mbulk_100k_conc20_rps/host.sh b/test/benchmark/redis/ping_mbulk_100k_conc20_rps/host.sh index af651378..a8c7d9a1 100755 --- a/test/benchmark/redis/ping_mbulk_100k_conc20_rps/host.sh +++ b/test/benchmark/redis/ping_mbulk_100k_conc20_rps/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit diff --git a/test/benchmark/redis/set_100k_conc20_rps/host.sh b/test/benchmark/redis/set_100k_conc20_rps/host.sh index 84f5878c..e0a83410 100755 --- a/test/benchmark/redis/set_100k_conc20_rps/host.sh +++ b/test/benchmark/redis/set_100k_conc20_rps/host.sh @@ -7,7 +7,8 @@ set -e # Function to stop the guest VM stop_guest() { echo "Stopping guest VM..." - pgrep qemu | xargs kill + # `-r` means if there's no qemu, the kill won't be executed + pgrep qemu | xargs -r kill } # Trap EXIT signal to ensure guest VM is stopped on script exit