Use unique temp file names

This commit is contained in:
Andras Fekete
2023-08-18 13:11:31 -04:00
parent 3df434930e
commit bea1b6f89b

View File

@@ -90,10 +90,10 @@ EOF
) )
for i in $PERMUTATIONS;do for i in $PERMUTATIONS;do
echo -e "\nTesting $SIDE permutations order $i...\n" echo -e "\nTesting $SIDE permutations order $i...\n"
UDP_LOGFILE=/tmp/udp-$SIDE-$i UDP_LOGFILE=$(mktemp)
rm -f $UDP_LOGFILE
run_test "-r $i -S $SIDE -l $UDP_LOGFILE" "-Ta -w" "-w" run_test "-r $i -S $SIDE -l $UDP_LOGFILE" "-Ta -w" "-w"
echo "...produced $(grep -P 'client:|server:' $UDP_LOGFILE | wc -l) messages" echo "...produced $(grep -P 'client:|server:' $UDP_LOGFILE | wc -l) messages"
rm -f $UDP_LOGFILE
done done
echo "All $SIDE msg permutations succeeded" echo "All $SIDE msg permutations succeeded"
} }
@@ -112,10 +112,10 @@ EOF
) )
for DELAY in $DELAYS;do for DELAY in $DELAYS;do
echo -e "\nTesting delay $DELAY...\n" echo -e "\nTesting delay $DELAY...\n"
UDP_LOGFILE=/tmp/udp-delay-$DELAY UDP_LOGFILE=$(mktemp)
rm -f $UDP_LOGFILE
run_test "-l $UDP_LOGFILE -t $DELAY" "-Ta -w" "-w" run_test "-l $UDP_LOGFILE -t $DELAY" "-Ta -w" "-w"
echo "...produced $(grep -P 'client:|server:' $UDP_LOGFILE | wc -l) messages" echo "...produced $(grep -P 'client:|server:' $UDP_LOGFILE | wc -l) messages"
rm -f $UDP_LOGFILE
done done
} }