summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/sys/sys_test.go
diff options
context:
space:
mode:
authorRahat Mahmood <rahat@google.com>2020-01-22 15:14:43 -0800
committergVisor bot <gvisor-bot@google.com>2020-01-22 15:16:21 -0800
commit896bd654b6622d20cbaf8e82b4554a5375addf81 (patch)
treef3ef298ec869f7ac8126d5a89fe3bc5f28c98c43 /pkg/sentry/fsimpl/sys/sys_test.go
parent1d97adaa6d73dd897bb4e89d4533936a95003951 (diff)
De-duplicate common test functionality for VFS2 filesystems.
PiperOrigin-RevId: 291041576
Diffstat (limited to 'pkg/sentry/fsimpl/sys/sys_test.go')
-rw-r--r--pkg/sentry/fsimpl/sys/sys_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/fsimpl/sys/sys_test.go b/pkg/sentry/fsimpl/sys/sys_test.go
index 60a1634a9..8b1cf0bd0 100644
--- a/pkg/sentry/fsimpl/sys/sys_test.go
+++ b/pkg/sentry/fsimpl/sys/sys_test.go
@@ -56,7 +56,7 @@ func TestReadCPUFile(t *testing.T) {
for _, fname := range []string{"online", "possible", "present"} {
pop := s.PathOpAtRoot(fmt.Sprintf("devices/system/cpu/%s", fname))
- fd, err := s.VFS.OpenAt(s.Ctx, s.Creds, &pop, &vfs.OpenOptions{})
+ fd, err := s.VFS.OpenAt(s.Ctx, s.Creds, pop, &vfs.OpenOptions{})
if err != nil {
t.Fatalf("OpenAt(pop:%+v) = %+v failed: %v", pop, fd, err)
}
@@ -75,7 +75,7 @@ func TestSysRootContainsExpectedEntries(t *testing.T) {
s := newTestSystem(t)
defer s.Destroy()
pop := s.PathOpAtRoot("/")
- s.AssertDirectoryContains(&pop, map[string]testutil.DirentType{
+ s.AssertAllDirentTypes(s.ListDirents(pop), map[string]testutil.DirentType{
"block": linux.DT_DIR,
"bus": linux.DT_DIR,
"class": linux.DT_DIR,