diff options
author | Adin Scannell <ascannell@google.com> | 2020-03-25 16:55:02 -0700 |
---|---|---|
committer | Adin Scannell <ascannell@google.com> | 2020-04-08 10:00:14 -0700 |
commit | 94b793262d3c54b4c32fed83d2bd121069680d15 (patch) | |
tree | c89f8101c0a39d419f21793afbd38e9eb8f64840 /pkg/sentry/contexttest | |
parent | 71c7e24e5cb8641f4cb98b5fc848ae2033b29eac (diff) |
Fix all copy locks violations.
This required minor restructuring of how system call tables were saved
and restored, but it makes way more sense this way.
Updates #2243
Diffstat (limited to 'pkg/sentry/contexttest')
-rw-r--r-- | pkg/sentry/contexttest/contexttest.go | 4 |
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 |