Commit Graph

28 Commits

Author SHA1 Message Date
Fabricio Voznika e8a25a2834 Enable strace+debug in syscall tests
This is done to ease troubleshooting when tests fail. runsc
logs are not stored when tests passe, so this will only
affect failing tests and should not increase log storage
too badly.

PiperOrigin-RevId: 327717551
2020-08-20 16:19:10 -07:00
gVisor bot e6df6222ac Merge pull request #3250 from craig08:fuse-getattr
PiperOrigin-RevId: 326313858
2020-08-12 14:36:04 -07:00
Fabricio Voznika 00b684ea7f Limit the scope when deleting test log directory on success
The code was deleting logs for all tests when a single test
passed. Change it to delete only the logs relevant to the
test at hand.

Also fixed the benchmark lookup code, which was always generating
a single empty benchmark entry if there were not benchmarks.

PiperOrigin-RevId: 326311477
2020-08-12 14:23:29 -07:00
Craig Chi 51e64d2fc5 Implement FUSE_GETATTR
FUSE_GETATTR is called when a stat(2), fstat(2), or lstat(2) is issued
from VFS2 layer to a FUSE filesystem.

Fixes #3175
2020-08-10 18:15:32 -07:00
Ayush Ranjan a1af46c20a Enable VFS2 by default for all syscall tests.
Fixes #2923

PiperOrigin-RevId: 325904734
2020-08-10 15:50:22 -07:00
Adin Scannell 90021e775a Add bzl_library rules for .bzl files without one.
PiperOrigin-RevId: 325280924
2020-08-06 12:10:49 -07:00
Craig Chi 21d0334e7f Add FUSE integration test
This commit adds an integration test framework for FUSE support. Please
refer to the test example and test/fuse/README.md for further details.

Fixes #3098
2020-08-04 12:27:55 -07:00
gVisor bot 1876225fc8 Merge pull request #3377 from kevinGC:native-tags
PiperOrigin-RevId: 323398518
2020-07-27 11:10:24 -07:00
Andrei Vagin d6b676ae6a test/syscall: run each test case in a separate network namespace
... when it is possible.

The guitar gVisorKernel*Workflow-s runs test with the local execution_method.
In this case, blaze runs test cases locally without sandboxes. This means
that all tests run in the same network namespace. We have a few tests which
use hard-coded network ports and they can fail if one of these port will be
used by someone else or by another test cases.

PiperOrigin-RevId: 323137254
2020-07-25 01:04:45 -07:00
Kevin Krakauer 91a47a40a8 Bugfix: non-native tests were tagged as native
Copy the list of tags when passing it to _syscall_test.
2020-07-24 17:27:11 -07:00
gVisor bot 8939fae0af Merge pull request #3165 from ridwanmsharif:ridwanmsharif/fuse-off-by-default
PiperOrigin-RevId: 321411758
2020-07-15 12:14:42 -07:00
gVisor bot c81ac8ec3b Merge pull request #2672 from amscanne:shim-integrated
PiperOrigin-RevId: 321053634
2020-07-13 16:10:58 -07:00
Ridwan Sharif abffebde7b Gate FUSE behind a runsc flag
This change gates all FUSE commands (by gating /dev/fuse) behind a runsc
flag. In order to use FUSE commands, use the --fuse flag with the --vfs2
flag. Check if FUSE is enabled by running dmesg in the sandbox.
2020-07-09 02:01:29 -04:00
Nicolas Lacasse f0feada89c Use internal tmpfs in test runner, even when running with overlay.
PiperOrigin-RevId: 317377571
2020-06-19 14:14:21 -07:00
Michael Pratt 6d806ee719 Remove various uses of 'blacklist'
Updates #2972

PiperOrigin-RevId: 316942245
2020-06-17 12:34:33 -07:00
Rahat Mahmood f23f62c2c2 Correctly set the test VFS environment variable.
Also fix test bugs uncovered now that they aren't silently skipped on
VFS2.

Updates #1487.

PiperOrigin-RevId: 316415807
2020-06-15 01:09:38 -07:00
Adin Scannell 5a894e35a0 Remove generated logs when test succeeds.
PiperOrigin-RevId: 316022884
2020-06-11 19:05:18 -07:00
Andrei Vagin 9e66ac4c20 test/syscall: run hostnet tests in separate network namespaces
A few tests use hard coded port numbers, so we need to guruantee that
these ports will not be used for somthing else.
2020-06-04 18:23:45 -07:00
Fabricio Voznika 4b5eae39f2 Enable VFS2 to runsc syscall tests
Updates #1487

PiperOrigin-RevId: 314271995
2020-06-01 23:03:20 -07:00
Gaurav Singh a2b3b67b3f runner: fix goroutine leak
Signed-off-by: Gaurav Singh <gaurav1086@gmail.com>
2020-05-29 12:36:49 -04:00
Jamie Liu 198642df76 Fix IsRunningWithVFS1() on the runsc-based test runner.
Updates #1035

PiperOrigin-RevId: 312736450
2020-05-21 14:02:43 -07:00
Adin Scannell 1481499fe2 Simplify Docker test infrastructure.
This change adds a layer of abstraction around the internal Docker APIs,
and eliminates all direct dependencies on Dockerfiles in the infrastructure.

A subsequent change will automated the generation of local images (with
efficient caching). Note that this change drops the use of bazel container
rules, as that experiment does not seem to be viable.

PiperOrigin-RevId: 308095430
2020-04-23 11:33:30 -07:00
gVisor bot 8b72623e6a Internal change.
PiperOrigin-RevId: 307622320
2020-04-21 09:44:00 -07:00
Andrei Vagin d5fe1ce0c1 test: Create a separate /tmp mount only for tests with the shared tag
The root mount is not shared by default, but all other mounts are shared.

So if we create the /tmp mount, this means that we run tests on a shared mount
even if tests run without the --shared option.

PiperOrigin-RevId: 302130790
2020-03-20 17:20:24 -07:00
Andrei Vagin 504c9e14d6 test/runner: use proper filters for test cases
The benchmark_filter options accepts regex-s, but
the gtest-filter option accepts shell-like wildcards.

Fixes #2034

Signed-off-by: Andrei Vagin <avagin@gmail.com>
2020-03-04 12:52:13 -08:00
Adin Scannell 160d5751ab Add default behavior for gtest runner.
PiperOrigin-RevId: 297009116
2020-02-24 17:29:34 -08:00
Adin Scannell 10aa4d3b34 Factor platform tags.
PiperOrigin-RevId: 296519566
2020-02-21 15:06:08 -08:00
Adin Scannell 30794512d3 Add basic microbenchmarks.
PiperOrigin-RevId: 296104390
2020-02-19 18:21:54 -08:00