2 Commits

Author SHA1 Message Date
Ayush Ranjan 5c8be5da4d Add regression test for #9848.
Updates #9848

PiperOrigin-RevId: 595593495
2024-01-03 22:13:07 -08:00
Ayush Ranjan 3f8d2bbee1 Deflake test/syscalls:connect_external_test_native.
This native test was flaking on Buildkite because it would timeout. The test
itself would pass but I think a cleanup stage would hang indefinitely. Such a
hang would only happen when one of the cleaners from uds.go:createPipeReader()
would fail with the following log:
`Failed to kick pipe reader: open /tmp/sockets930502909/pipe/out: no such
device or address`.

The connect_external_test does not even use pipes. It is unnecessary setup and
cleanup steps. Furthermore, test logs are very noisy from these such setup and
cleanup steps for tests that are not even run.

Although I am not sure why failing to kick the pipe reader would cause the test
to hang, I have split out the setup done in `CreateSocketTree()` into 3 parts:
1. Creating a UDS tree so that sandbox can connect to it.
2. Create connectors outside sandbox who connect to sockets created by sandbox.
3. Creating pipes outside the sandbox that sandbox can read/write to.

I also split the test targets into separate tests. These setup steps are only
done for their respective tests. Makes the logs more relevant, gets rid of
unnecessary steps and failures and deflakes the native connect test.

PiperOrigin-RevId: 511128400
2023-02-21 01:11:38 -08:00