summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/contexttest/contexttest.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-04-09 19:16:46 -0700
committergVisor bot <gvisor-bot@google.com>2020-04-09 19:16:46 -0700
commit78126611e61e26269d804dd18a5229820c4ddced (patch)
tree8c1e421faa3173cb2a95187e39ee9201fd7c3b7e /pkg/sentry/contexttest/contexttest.go
parentc560bfd1a8cd61c869e180c6cc7bb917fc29e92e (diff)
parent867eeb18d8c65019fb755194d5bdf768837f07a8 (diff)
Merge pull request #2253 from amscanne:nogo
PiperOrigin-RevId: 305807868
Diffstat (limited to 'pkg/sentry/contexttest/contexttest.go')
-rw-r--r--pkg/sentry/contexttest/contexttest.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/sentry/contexttest/contexttest.go b/pkg/sentry/contexttest/contexttest.go
index 031fc64ec..8e5658c7a 100644
--- a/pkg/sentry/contexttest/contexttest.go
+++ b/pkg/sentry/contexttest/contexttest.go
@@ -97,7 +97,7 @@ type hostClock struct {
}
// Now implements ktime.Clock.Now.
-func (hostClock) Now() ktime.Time {
+func (*hostClock) Now() ktime.Time {
return ktime.FromNanoseconds(time.Now().UnixNano())
}
@@ -127,7 +127,7 @@ func (t *TestContext) Value(key interface{}) interface{} {
case uniqueid.CtxInotifyCookie:
return atomic.AddUint32(&lastInotifyCookie, 1)
case ktime.CtxRealtimeClock:
- return hostClock{}
+ return &hostClock{}
default:
if val, ok := t.otherValues[key]; ok {
return val