diff --git a/test/lwt/hash_server.ml b/test/lwt/hash_server.ml index 0bae785c..a84f6ccb 100644 --- a/test/lwt/hash_server.ml +++ b/test/lwt/hash_server.ml @@ -211,8 +211,9 @@ let main ~port ~runner () : unit Lwt.t = Trace.message "exit handle client" in - let addr = Unix.ADDR_INET (Unix.inet_addr_any, port) in + let addr = Unix.ADDR_INET (Unix.inet_addr_loopback, port) in let _server = M_lwt.TCP_server.establish_lwt ~runner addr handle_client in + Printf.printf "listening on port=%d\n%!" port; lwt_fut diff --git a/test/lwt/output_echo.expected b/test/lwt/output_echo.expected index ddfd1845..4311fe1a 100644 --- a/test/lwt/output_echo.expected +++ b/test/lwt/output_echo.expected @@ -1,7 +1,8 @@ -listening on port 1235 -run echo client -p 1235 -n 10 --n-conn=2 -j=4 +run echo server on port=12346 +listening on port 12346 +run echo client -p 12346 -n 10 --n-conn=2 -j=4 all done -connecting to port 1235 +connecting to port 12346 read: hello 1 read: hello 1 read: hello 1 diff --git a/test/lwt/output_hash.expected b/test/lwt/output_hash.expected index c0b9551f..300672df 100644 --- a/test/lwt/output_hash.expected +++ b/test/lwt/output_hash.expected @@ -1,5 +1,7 @@ -listening on port 1234 -run hash client -p 1234 -d ../data/ --n-conn=2 -j=4 +running hash server on port=12345 +listening on port 12345 +listening on port=12345 +run hash client -p 12345 -d ../data/ --n-conn=2 -j=4 ../data/d1/large: fdb479c5661572f9606266eeb280b4db5c26cc38 ../data/d1/large: fdb479c5661572f9606266eeb280b4db5c26cc38 ../data/d1/large_10: c31560efa1a5ad6dbf89990d51878f3bd64b13ce @@ -440,5 +442,5 @@ run hash client -p 1234 -d ../data/ --n-conn=2 -j=4 ../data/d9/large_9: 7893508ace6bc8a4d65e03ebf88a9be6c188af17 ../data/d9/smol: 31416013d3060b8056a601c9f6719e94e7e9f7ed ../data/d9/smol: 31416013d3060b8056a601c9f6719e94e7e9f7ed -connecting to port 1234 +connecting to port 12345 hash dir="../data/" diff --git a/test/lwt/run_echo.sh b/test/lwt/run_echo.sh index de476edf..70d833e1 100755 --- a/test/lwt/run_echo.sh +++ b/test/lwt/run_echo.sh @@ -1,15 +1,16 @@ #!/bin/bash -PORT=1235 +PORT=12346 +echo "run echo server on port=$PORT" ./echo_server.exe -p $PORT & if [ "x$?" != x0 ]; then exit 1 ; fi -sleep 0.9 -echo "run echo client -p $PORT $@" +sleep 2 +echo "run echo client -p $PORT $*" export LC_LANG=C export LC_ALL=C -./echo_client.exe -p $PORT $@ | sort +./echo_client.exe -p $PORT "$@" | sort kill %1 diff --git a/test/lwt/run_hash.sh b/test/lwt/run_hash.sh index 0adefd75..eca6cc57 100755 --- a/test/lwt/run_hash.sh +++ b/test/lwt/run_hash.sh @@ -1,10 +1,11 @@ #!/bin/bash -PORT=1234 +PORT=12345 +echo "running hash server on port=$PORT" ./hash_server.exe -p $PORT & if [ "x$?" != x0 ]; then exit 1 ; fi -sleep 0.9 +sleep 2 echo "run hash client -p $PORT $@" export LC_LANG=C