whatcanGOwrong
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package testutils
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"os"
|
||||
|
||||
"github.com/cilium/ebpf/rlimit"
|
||||
)
|
||||
|
||||
func init() {
|
||||
// Increase the memlock for all tests unconditionally. It's a great source of
|
||||
// weird bugs, since different distros have different default limits.
|
||||
if err := rlimit.RemoveMemlock(); err != nil {
|
||||
fmt.Fprintln(os.Stderr, "WARNING: Failed to adjust rlimit, tests may fail")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user