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)
| 100 | // Main reason for this check is travis limiting mlockable memory to 64KB |
| 101 | // https://github.com/travis-ci/travis-ci/issues/2462 |
| 102 | func 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 | } |
no test coverage detected