maskit opened a new pull request, #13955:
URL: https://github.com/apache/trafficserver/pull/13955

   ## Why
   
   The `tcp-incomplete-header` case of `test_accept_timeout` ran `nc -c 
create_request.sh 127.0.0.1 <port>`, relying on ncat's `-c`, which runs a 
command with its output sent to the connection. BSD `nc`, as shipped on macOS, 
reads `-c` as "send CRLF" and takes no argument, so it treated the script path 
as the host and failed with `nc: port range not valid` without connecting. The 
case then failed on macOS. CI uses ncat and was unaffected.
   
   ## Change
   
   Pipe `create_request.sh` into the timing wrapper and use a plain `nc 
127.0.0.1 <port>` client, which means the same thing to ncat and BSD `nc`. This 
combines two patterns the tests already use: the `delay_client*.sh` scripts 
used by `test_post_early_return` pipe timed request bytes into a plain `nc` 
client, and the TLS cases in the same function pipe their input into the timing 
wrapper.
   
   The script sends a partial request header and then sleeps for 11 seconds, so 
the client's input stays open until well after ATS closes the connection at the 
6-second transaction inactivity timeout. Neither `nc` sees end of input during 
the measured interval, so the difference in how ncat and BSD `nc` handle it 
does not matter.
   
   ## Validation
   
   On macOS, `tcp-incomplete-header` passes, with the timing wrapper reporting 
the transaction inactivity timeout; it failed with `nc: port range not valid` 
before this change. The two TLS cases pass. `tcp-no-data` uses `telnet`, which 
macOS does not ship, and skips as before.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to