diff --git a/test/benchmark/iperf3/tcp_virtio_bw/host.sh b/test/benchmark/iperf3/tcp_virtio_bw/host.sh index 9c61a2fb8..5f8912bfb 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 681eb92d2..7caf45af6 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 dab790354..411d5aeab 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 9aa37551b..9cd6262b9 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 ff6d44284..74ece7904 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 aabd10e54..e595922ca 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 7cf609bd2..1f0540621 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 ec9e945ec..a629162b2 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 5417bba86..a1c713a79 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 f5bd38036..19fbd55b8 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 a3a7de672..2d81bbc4c 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 753aab375..32eb3cb81 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 4e2d124e6..b67b74999 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 af6513780..a8c7d9a1d 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 84f5878c7..e0a83410d 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