summaryrefslogtreecommitdiffhomepage
path: root/pkg
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@gmail.com>2020-09-14 15:32:46 -0700
committerAndrei Vagin <avagin@gmail.com>2020-09-16 12:22:17 -0700
commitf148242abab1ff043428036ccaf464de98268863 (patch)
tree1e57aea21f2fe0cfaf7031d6fa4b9f2fb3b0aa8c /pkg
parent113928754c26ea3d4d7d387bae459ce447774d30 (diff)
Revert "fuse: add benchmarking support for FUSE"
test/fuse/benchmark/read_benchmark.cc:34: Failure Expected: (fuse_prefix) != (nullptr), actual: NULL vs (nullptr) external/com_google_benchmark/src/benchmark_runner.cc:120: RunInThread: Check `st.iterations() >= st.max_iterations' failed. Benchmark returned before State::KeepRunning() returned false! --- FAIL: Benchmarks_BM_Read/262144/real_time (0.29s) runner.go:502: test "Benchmarks.BM_Read/262144/real_time" failed with error exit status 134, want nil FAIL
Diffstat (limited to 'pkg')
-rw-r--r--pkg/sentry/fs/g3doc/fuse.md47
-rw-r--r--pkg/test/dockerutil/container.go10
-rw-r--r--pkg/test/dockerutil/dockerutil.go20
3 files changed, 0 insertions, 77 deletions
diff --git a/pkg/sentry/fs/g3doc/fuse.md b/pkg/sentry/fs/g3doc/fuse.md
index 496e339ce..2ca84dd74 100644
--- a/pkg/sentry/fs/g3doc/fuse.md
+++ b/pkg/sentry/fs/g3doc/fuse.md
@@ -254,53 +254,6 @@ I/O syscalls like `read(2)`, `write(2)` and `mmap(2)`.
- `FUSE_BMAP`: Old address space API for block defrag. Probably not needed.
- `FUSE_NOTIFY_REPLY`: [TODO: what does this do?]
-## Benchmark FUSE
-
-FUSE benchmark makes FUSE syscall inside docker container to make sure required
-environment conditions are met - such as having the right libraries to start a
-FUSE server.
-
-### Setup
-
-To run benchmark:
-
-1. Make sure you have `Docker` installed.
-2. Download all docker images `make load-all-images`.
-3. Config `runsc` docker runtime to have VFS2 and FUSE supported.
-(e.g. `make configure RUNTIME=runsc ARGS="--vfs2 --fuse ..." ...`)
-
-You should now have a runtime with the following options configured in
-`/etc/docker/daemon.json`
-```
-"runsc": {
- "path": "path/to/your/runsc",
- "runtimeArgs": [
- "--vfs2",
- "--fuse"
- ...
- ]
- }
-```
-
-### Running benchmarks
-With above setup, benchmark can be run with following command
-```
-bazel test --test_output=all --cache_test_results=no --test_arg=-test.bench= //path/to:target
-```
-For example: if you want to run stat test
-```
-bazel test --test_output=all --cache_test_results=no --test_arg=-test.bench= //test/fuse:open_benchmark_runsc_ptrace_vfs2_fuse_container
-```
-
-Note:
-- test target need to have `vfs2_fuse_container` to run in container with `vfs2` and `fuse` enabled
-- `test_output` set to `all` to view the result in terminal
-- `--cache_test_results` set to `no` to avoid cached benchmark
-
-### Use your fuse server
-
-To use your own FUSE server, change the `images/basic/fuse/Dockerfile` to compile your FUSE server into the container and name it `server-bin`.
-
# References
- [fuse(4) Linux manual page](https://www.man7.org/linux/man-pages/man4/fuse.4.html)
diff --git a/pkg/test/dockerutil/container.go b/pkg/test/dockerutil/container.go
index 727be26b2..64d17f661 100644
--- a/pkg/test/dockerutil/container.go
+++ b/pkg/test/dockerutil/container.go
@@ -136,11 +136,6 @@ func MakeNativeContainer(ctx context.Context, logger testutil.Logger) *Container
}
}
-// Runtime returns the runtime of the container.
-func (c *Container) Runtime() string {
- return c.runtime
-}
-
// AddProfile adds a profile to this container.
func (c *Container) AddProfile(p Profile) {
c.profiles = append(c.profiles, p)
@@ -546,8 +541,3 @@ func (c *Container) CleanUp(ctx context.Context) {
// Forget all mounts.
c.mounts = nil
}
-
-// CopyErr returns the error that happened during copy.
-func (c *Container) CopyErr() error {
- return c.copyErr
-}
diff --git a/pkg/test/dockerutil/dockerutil.go b/pkg/test/dockerutil/dockerutil.go
index a2d7e8c85..7027df1a5 100644
--- a/pkg/test/dockerutil/dockerutil.go
+++ b/pkg/test/dockerutil/dockerutil.go
@@ -121,26 +121,6 @@ func UsingVFS2() (bool, error) {
return false, nil
}
-// UsingFUSE returns true if the 'runtime' has the fuse flag set.
-func UsingFUSE() (bool, error) {
- rMap, err := runtimeMap()
- if err != nil {
- return false, err
- }
-
- list, ok := rMap["runtimeArgs"].([]interface{})
- if !ok {
- return false, fmt.Errorf("unexpected format: %v", rMap)
- }
-
- for _, element := range list {
- if element == "--fuse" {
- return true, nil
- }
- }
- return false, nil
-}
-
func runtimeMap() (map[string]interface{}, error) {
// Read the configuration data; the file must exist.
configBytes, err := ioutil.ReadFile(*config)