From b0799f87527016eab92864562c30c330274f368c Mon Sep 17 00:00:00 2001 From: nom3ad <19239479+nom3ad@users.noreply.github.com> Date: Tue, 2 Jan 2024 23:41:02 +0530 Subject: [PATCH] Fix benchmarking script to use correct node parameter --- hack/run-benchmark | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hack/run-benchmark b/hack/run-benchmark index 72b2ca0..94600bf 100755 --- a/hack/run-benchmark +++ b/hack/run-benchmark @@ -16,14 +16,14 @@ function with_set_x() { benchmark() { local sshuttle_bin="${1?:}" - local node="${2:-'node-1'}" + local node="${2:-"node-1"}" echo -e "\n======== Benchmarking sshuttle: $sshuttle_bin ========" - ./exec-sshuttle "$node" --sshuttle-bin="$sshuttle_bin" --listen 55771 & + with_set_x ./exec-sshuttle "$node" --sshuttle-bin="$sshuttle_bin" --listen 55771 & sshuttle_pid=$! trap 'kill -0 $sshuttle_pid &>/dev/null && kill -15 $sshuttle_pid' EXIT while ! nc -z localhost 55771; do sleep 0.1; done sleep 1 - ./exec-tool iperf3 1 --time=4 + ./exec-tool iperf3 "$node" --time=4 with_set_x kill -15 $sshuttle_pid wait $sshuttle_pid || true }