Refactor loops and improve formatting in runtest.sh for better readability

This commit is contained in:
Yaro Kasear 2025-04-21 14:53:40 -05:00
parent d92621d2f0
commit 434add2694

View file

@ -18,7 +18,10 @@ fi
sudo -v
while true; do sudo -n true; sleep 60; done 2>/dev/null &
while true; do
sudo -n true
sleep 60
done 2>/dev/null &
SUDO_KEEPALIVE_PID=$!
echo "Starting kismet..."
@ -108,7 +111,6 @@ while [ "$COUNTER" -lt "$NUM_TESTS" ]; do
COUNTER=$((COUNTER + 1))
echo "Executing test $COUNTER of $NUM_TESTS..."
for ((i = 1; i <= NUM_SAMPLES; i++)); do
echo " Gathering sample $i of $NUM_SAMPLES..."
START_TIME=$(date -Iseconds)
@ -140,7 +142,6 @@ while [ "$COUNTER" -lt "$NUM_TESTS" ]; do
continue # Skip this sample
fi
# TX failure delta
FAILED_NOW=$(get_tx_failed)
FAILED_DELTA=$((FAILED_NOW - FAILED_START))