google / packetdrill

The official Google release of packetdrill
GNU General Public License v2.0
887 stars 220 forks source link

net-test: packetdrill: update tcp/epoll tests to latest kernel behavior #76

Open rrendec opened 1 year ago

rrendec commented 1 year ago

The EPOLLOUT tests expect a buggy kernel behavior where EPOLLOUT is not sent in some circumstances, when only a small fragment is acknowledged. Kernel commit 4bfe744ff164 "tcp: fix potential xmit stalls caused by TCP_NOTSENT_LOWAT" changes the kernel behavior in that regard and fixes the bug.

Adapt the EPOLLOUT tests to match the new/correct kernel behavior.

The epoll_out_edge.pkt and epoll_out_edge_default_notsent_lowat.pkt tests require an additional change because the last write is a full write now. Instead of changing the write size to make it a partial write again, keep the write size unchanged and adjust the expected result of epoll_wait(), since partial writes are already tested earlier in the test flow.