Commit Graph
9 Commits
Author SHA1 Message Date
Alex KonradiandgVisor bot 65a32da6ce Add a test for receiving UDP packet with src port 0
Add a test that validates that when a UDP packet is received with a source port
value of 0, it is delivered to a listening socket.

PiperOrigin-RevId: 536773375
2023-05-31 11:31:05 -07:00
Alex KonradiandgVisor bot 4bc8ad7084 Use non-zero timeout for polling TCP connection
Allow poll to wait for a signal on the socket instead of requiring that
it be set immediately. This fixes flakiness caused by connections not
being established fast enough. For https://fxbug.dev/124433

PiperOrigin-RevId: 520212110
2023-03-28 20:36:14 -07:00
Derek MauroandgVisor bot 7480d7b79f Internal change.
PiperOrigin-RevId: 481202690
2022-10-14 12:11:32 -07:00
Alex KonradiandgVisor bot 8de434eb60 Internal change.
PiperOrigin-RevId: 470742476
2022-08-29 09:45:52 -07:00
Arthur SfezandgVisor bot 02aba2b7e4 Allow martian packets on packet socket dgram tests
Before this change, this test fixture expected it to be enabled already
instead of updating the config.

The Teardown method also restore the initial configuration, so that
these tests do not permanently change the config of the machines that
run the tests.

PiperOrigin-RevId: 447814273
2022-05-10 13:38:26 -07:00
Jamie LiuandgVisor bot 6c2b33e994 Automated rollback of changelist 443736918
PiperOrigin-RevId: 444415265
2022-04-25 17:38:38 -07:00
gVisor bot 53e3b94d65 Internal change.
PiperOrigin-RevId: 443736918
2022-04-22 12:56:48 -07:00
Kevin LindkvistandgVisor bot 3fd05adfa4 Conditionally use GetAbsoluteTestTmpdir() rather than hard-code "/tmp"
NewTempAbsPathInDir("/tmp") prevents the generated socket address from
exceeding sizeof(addr.sun_path). However, existing systems that are built with
the ANDROID configuration have their temp directory in a different location.
This change allows those systems to run tests that depend on UniqueUnixAddr.

PiperOrigin-RevId: 395336483
2021-09-07 14:58:39 -07:00
Ghanan GowripalanandgVisor bot 129cc47c63 Move socket_test_util to //test/util
...and rename the library to socket_util.

PiperOrigin-RevId: 386348306
2021-07-22 16:37:15 -07:00