# /home/anton/tmp/robsd/src-regress-usr.bin-ftp.diff diff --git regress/usr.bin/ftp/redirect.sh regress/usr.bin/ftp/redirect.sh index c553009d28ea..ac5d116fabab 100644 --- regress/usr.bin/ftp/redirect.sh +++ regress/usr.bin/ftp/redirect.sh @@ -6,6 +6,8 @@ : ${rport1:=9000} : ${rport2:=9001} +id=$RANDOM + req1=$1 loc=$2 req2=$3 @@ -16,16 +18,16 @@ echo "Testing $req1 => $loc => $req2" while pkill -fx "nc -4 -l $rport1" && sleep 1; do done echo "HTTP/1.0 302 Found\r\nLocation: $loc\r\n\r" | \ - nc -4 -l $rport1 >/dev/null & + ktrace -di -f ktrace-nc-${id}.out nc -4 -l $rport1 >/dev/null & # Wait for the "server" to start -until fstat | egrep 'nc[ ]+.*tcp 0x[0-9a-f]* \*:9000' > /dev/null; do +until fstat | egrep 'nc[ ]+.*tcp 0x[0-9a-f]* \*:9000'; do sleep .1 done unset http_proxy -${FTP} -4 -o/dev/null -v $req1 2>&1 | tee redirect.log +ktrace -di -f ktrace-ftp-${id}.out ${FTP} -4 -o/dev/null -v $req1 2>&1 | tee redirect.log res=$(sed '/^Redirected to /{s///;x;};$!d;x' redirect.log) if [ X"$res" != X"$req2" ]; then