Commit Graph

15 Commits

Author SHA1 Message Date
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
Adin Scannell 48dfb8db9e Add image presubmit tests and mark fsstress x86_64 only.
PiperOrigin-RevId: 353118942
2021-01-21 15:53:34 -08:00
Ayush Ranjan 1a072e298e [infra] Attempt to fix Kokoro image workflow.
#5274 broke `make load-basic_fsstress` target. It works locally but for some
inconceivable reason it fails to build on Kokoro.

Error message:
```
Step 1/12 : FROM alpine
 ---> 1fca6fe4a1ec
Step 2/12 : RUN apk add git
 ---> Running in 109a5326259a
standard_init_linux.go:207: exec user process caused "no such file or directory"
The command '/bin/sh -c apk add git' returned a non-zero code: 1
make: *** [load-basic_fsstress] Error 1
tools/images.mk:149: recipe for target 'load-basic_fsstress' failed
```

Copied the approach from the following issue to achieve the same goal:
https://github.com/nodejs/docker-node/issues/586#issue-273737852.

PiperOrigin-RevId: 352602945
2021-01-19 10:46:59 -08:00
Fabricio Voznika c7fc4a5d66 Add fsstress tests
Updates #5273

PiperOrigin-RevId: 352088736
2021-01-15 14:51:51 -08:00
Peter Johnston eeb23531eb Support icmpv6 transport protocol
PiperOrigin-RevId: 346101076
2020-12-07 08:44:44 -08:00
Adin Scannell 06200cb5cf Improve multi-arch support.
This change allows Dockerfiles named Dockerfile.$(ARCH) and makes list-images
list only supported architectures.

Updates #2847

PiperOrigin-RevId: 336108293
2020-10-08 10:05:40 -07:00
Fabricio Voznika f20e63e31b Add LinkAt support to gofer
Updates #1198

PiperOrigin-RevId: 325350818
2020-08-06 18:16:21 -07:00
Jamie Liu 1b11326ecd Call lseek(0, SEEK_CUR) unconditionally in runsc fsgofer's Readdir(offset=0).
9P2000.L is silent as to how readdir RPCs interact with directory mutation. The
most performant option is for Treaddir with offset=0 to restart iteration,
avoiding needing to walk+open+clunk a new directory fid between invocations of
getdents64(2), and the VFS2 gofer client assumes this is the case. Make this
actually true for the runsc fsgofer.

Fixes #3344, #3345, #3355

PiperOrigin-RevId: 324090384
2020-07-30 15:02:22 -07:00
Adin Scannell e1a04f84e8 Add standard entrypoints for test targets.
PiperOrigin-RevId: 322265513
2020-07-20 18:05:05 -07:00
Adin Scannell c60613475c Standardize all Docker images.
This change moves all Docker images to a standard location, and abstracts the
build process so that they can be maintained in an automated fashion. This also
allows the images to be architecture-independent.

All images will now be referred to by the test framework via the canonical
`gvisor.dev/images/<name>`, where `<name>` is a function of the path within the
source tree.

In a subsequent change, continuous integration will be added so that the images
will always be correct and available locally.

In the end, using `bazel` for Docker containers is simply not possible. Given
that we already have the need to use `make` with the base container (for
Docker), we extend this approach to get more flexibility.

This change also adds a self-documenting and powerful Makefile that is intended
to replace the collection of scripts in scripts. Canonical (self-documenting)
targets can be added here for targets that understand which images need to be
loaded and/or built.

PiperOrigin-RevId: 308322438
2020-04-24 14:11:42 -07:00