14 Commits

Author SHA1 Message Date
xianzhe-databricks c4f686f4e1 Add a new RPC ConnectWithCreds to allow gofer to connect to a unix domain socket with application's credentials 2025-01-03 17:50:06 +01:00
Nayana Bidari a7b512f44e Add a C/R test for TCP listening connection.
This CL adds a test which verifies that the listening connections are restored
correctly after checkpoint. The test checkpoints when the tcp server is in the
listen state and verifies the read/write operations after the tcp server is
restored.

PiperOrigin-RevId: 684505213
2024-10-10 11:06:12 -07:00
Etienne Perot 1ea84d6db0 Add test that runs runsc do inside a non-gVisor container.
This is used in contexts such as Dangerzone:
https://gvisor.dev/blog/2024/09/23/safe-ride-into-the-dangerzone/

Updates issue #10944.

PiperOrigin-RevId: 682454284
2024-10-04 14:40:07 -07:00
Fabricio Voznika 919cfd12bd Add FIONREAD to host file description
Closes #8544

PiperOrigin-RevId: 535456427
2023-05-25 18:25:42 -07:00
Ayush Ranjan 681c7ddd5a Add docker test for external UDS connect.
Serves as a regression test for #8126.
Our unit tests didn't catch the issue because they run runsc with the flag
-TESTONLY-unsafe-nonroot. Docker tests are more e2e, they run tests in Docker
containers.

Fixes #8126

PiperOrigin-RevId: 488945922
2022-11-16 08:26:21 -08:00
gVisor bot 4c7dba96f8 Merge pull request #7167 from zhlhahaha:2438
PiperOrigin-RevId: 433048695
2022-03-07 15:03:09 -08:00
Fabricio Voznika dfcf798425 Fix epoll_ctl(2) regular files and dirs
Linux behaves differently for regular files and dirs for poll(2)/select(2)
compared to epoll_ctl(2). The latter returns EPERM for file and dirs.
I've also changed host FDs to behave like the underlying FD in regards
to epoll to keep it compatible with docker.

Fixes #7134

PiperOrigin-RevId: 429412692
2022-02-17 15:12:36 -08:00
Howard Zhang 2578fc5ef4 enable integrationtest image on MultiArch
Signed-off-by: Howard Zhang <howard.zhang@arm.com>
2022-02-10 20:20:21 +08:00
Fabricio Voznika 9768009a79 Don't eat error from epoll_ctl EPOLL_CTL_ADD
Docker maps stdin to `/dev/null` which doesn't support epoll. Host FD
was ignoring the error and suceeding the epoll_ctl call from the
container, giving false impressing that epoll would be notified.

This required plumbing failure to all waiter.Waitable.EventRegister
callers and implementers.

Closes #6795

PiperOrigin-RevId: 414797621
2021-12-07 12:36:00 -08:00
Fabricio Voznika 07836a3ff1 Implement ioctl(fd, FIONREAD) for host FDs
Closes #6796

PiperOrigin-RevId: 409013591
2021-11-10 17:07:06 -08:00
Ayush Ranjan fa2d3698c4 [infra] Do not recompile integration test executables each time.
Instead build the executable into the image.

PiperOrigin-RevId: 355631672
2021-02-04 08:28:38 -08:00
Ayush Ranjan f2c881f684 [vfs] Make sticky bit check consistent with Linux.
Our implementation of vfs.CheckDeleteSticky was not consistent with Linux,
specifically not consistent with fs/linux.h:check_sticky().

One of the biggest differences was that the vfs implementation did not
allow the owner of the sticky directory to delete files inside it that belonged
to other users.

This change makes our implementation consistent with Linux.

Also adds an integration test to check for this. This bug is also present in
VFS1.

Updates #3027

PiperOrigin-RevId: 355557425
2021-02-03 22:44:51 -08:00
Ayush Ranjan bfad3be0b7 Make ubuntutest image x86 only.
PiperOrigin-RevId: 355315140
2021-02-02 21:06:39 -08:00
Ayush Ranjan 0da3c72c9d [infra] Consolidate all ubuntu tests into one image.
This makes it easier to add more tests that run on Ubuntu. We can now just
add a bash script and call that from integration_test without having to set up
another image.

PiperOrigin-RevId: 355000410
2021-02-01 12:30:45 -08:00