mini tester ok

This commit is contained in:
asus
2023-02-17 13:11:27 +01:00
parent b401ebb5ab
commit 356267e288
8 changed files with 11991 additions and 121 deletions

View File

@@ -1,17 +1,11 @@
#!/bin/bash
port=0
while [ $port -lt 1024 -o $port -gt 10000 ]; do
port=$RANDOM
done
echo "Running tests on port $port..."
port=8081
clang -Wall -Wextra -Werror mini_serv.c -o mini_serv
./mini_serv "$port" &
nc localhost "$port" &
for i in {1..30}
for i in {1..3000}
do
nc localhost "$port" &
kill -KILL $(pidof nc | tr ' ' '\n' | head -n1)