Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 1.11 KB

File metadata and controls

24 lines (19 loc) · 1.11 KB

Tests for checking behavior of socket shutdown

Status

Name Result (FreeBSD)
shutdown-rd Passed
shutdown-wr Passed
shutdown-rd-wr Passed

Description

  • After calling shutdown(4, SHUT_RD), read() should not be able to run. However, we still get 0 as a return value instead of -1, though read() isn't getting called.
tests/bsd/tcp/shutdown/shutdown-rd.pkt:18: runtime error in read call: Expected result -1 but got 0
  • After calling shutdown(4, SHUT_RD), if client writes some data, the TCP stack should respond with a RST. However, FreeBSD responds with a delayed ACK in this case.
script packet:  0.360000 R 1:1(0)
actual packet:  0.367084 . 1:1(0) ack 1001 win 1008

FIXED as of this commit.

  • Note: After calling shutdown(SHUT_RD), FreeBSD still accepts data (and ACKs) but discards them.