summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/fsimpl/testutil
diff options
context:
space:
mode:
authorTamir Duberstein <tamird@google.com>2021-05-25 18:53:36 -0700
committergVisor bot <gvisor-bot@google.com>2021-05-25 18:57:38 -0700
commitb63e61828d0652ad1769db342c17a3529d2d24ed (patch)
tree9f5a942cecbfd33c17af91d99fecc6918aec9393 /pkg/sentry/fsimpl/testutil
parenta54cb9d8a2ca38c3d905f8694a18e6e8bef0e28f (diff)
Initialize Kernel.Timekeeper before network NS
PiperOrigin-RevId: 375843579
Diffstat (limited to 'pkg/sentry/fsimpl/testutil')
-rw-r--r--pkg/sentry/fsimpl/testutil/kernel.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/sentry/fsimpl/testutil/kernel.go b/pkg/sentry/fsimpl/testutil/kernel.go
index 8d47b5c40..438840ae2 100644
--- a/pkg/sentry/fsimpl/testutil/kernel.go
+++ b/pkg/sentry/fsimpl/testutil/kernel.go
@@ -88,6 +88,7 @@ func Boot() (*kernel.Kernel, error) {
return nil, fmt.Errorf("creating timekeeper: %v", err)
}
tk.SetClocks(time.NewCalibratedClocks())
+ k.SetTimekeeper(tk)
creds := auth.NewRootCredentials(auth.NewRootUserNamespace())
@@ -96,7 +97,6 @@ func Boot() (*kernel.Kernel, error) {
if err = k.Init(kernel.InitKernelArgs{
ApplicationCores: uint(runtime.GOMAXPROCS(-1)),
FeatureSet: cpuid.HostFeatureSet(),
- Timekeeper: tk,
RootUserNamespace: creds.UserNamespace,
Vdso: vdso,
RootUTSNamespace: kernel.NewUTSNamespace("hostname", "domain", creds.UserNamespace),