MCPcopy
hub / github.com/etcd-io/bbolt / skipOnMemlockLimitBelow

Function skipOnMemlockLimitBelow

unix_test.go:102–115  ·  view source on GitHub ↗

Main reason for this check is travis limiting mlockable memory to 64KB https://github.com/travis-ci/travis-ci/issues/2462

(t *testing.T, memlockLimitRequest uint64)

Source from the content-addressed store, hash-verified

100// Main reason for this check is travis limiting mlockable memory to 64KB
101// https://github.com/travis-ci/travis-ci/issues/2462
102func skipOnMemlockLimitBelow(t *testing.T, memlockLimitRequest uint64) {
103 var info unix.Rlimit
104 if err := unix.Getrlimit(unix.RLIMIT_MEMLOCK, &info); err != nil {
105 t.Fatal(err)
106 }
107
108 if info.Cur < memlockLimitRequest {
109 t.Skipf(
110 "skipping as RLIMIT_MEMLOCK is insufficient: %v < %v",
111 info.Cur,
112 memlockLimitRequest,
113 )
114 }
115}

Callers 3

TestMlock_DbOpenFunction · 0.85
TestMlock_DbCanGrow_BigFunction · 0.85

Calls 1

FatalMethod · 0.65

Tested by

no test coverage detected