summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/proc
diff options
context:
space:
mode:
authorJamie Liu <jamieliu@google.com>2021-01-20 17:14:04 -0800
committergVisor bot <gvisor-bot@google.com>2021-01-20 17:15:59 -0800
commita50bc8446c7f2167bf65588020924bd9c644d174 (patch)
tree77ec0ab4cda1a4558aa2bae6cee93b8dea4271a0 /pkg/sentry/fsimpl/proc
parenta733a8142e42b5405cb9b0da41b051dfd2f03716 (diff)
Don't use task goroutine context in fsimpl tests.
PiperOrigin-RevId: 352908368
Diffstat (limited to 'pkg/sentry/fsimpl/proc')
-rw-r--r--pkg/sentry/fsimpl/proc/tasks_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/fsimpl/proc/tasks_test.go b/pkg/sentry/fsimpl/proc/tasks_test.go
index 7ee6227a9..d6f076cd6 100644
--- a/pkg/sentry/fsimpl/proc/tasks_test.go
+++ b/pkg/sentry/fsimpl/proc/tasks_test.go
@@ -393,7 +393,7 @@ func TestProcSelf(t *testing.T) {
t.Fatalf("CreateTask(): %v", err)
}
- collector := s.WithTemporaryContext(task).ListDirents(&vfs.PathOperation{
+ collector := s.WithTemporaryContext(task.AsyncContext()).ListDirents(&vfs.PathOperation{
Root: s.Root,
Start: s.Root,
Path: fspath.Parse("/proc/self/"),
@@ -491,11 +491,11 @@ func TestTree(t *testing.T) {
t.Fatalf("CreateTask(): %v", err)
}
// Add file to populate /proc/[pid]/fd and fdinfo directories.
- task.FDTable().NewFDVFS2(task, 0, file, kernel.FDFlags{})
+ task.FDTable().NewFDVFS2(task.AsyncContext(), 0, file, kernel.FDFlags{})
tasks = append(tasks, task)
}
- ctx := tasks[0]
+ ctx := tasks[0].AsyncContext()
fd, err := s.VFS.OpenAt(
ctx,
auth.CredentialsFromContext(s.Ctx),