mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-17 09:23:48 +00:00
cmd/utils: Remove syscall.Rlimit in test
This commit is contained in:
parent
500b44cbdb
commit
067c11c7ff
1 changed files with 1 additions and 3 deletions
|
|
@ -18,7 +18,6 @@ package utils
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"syscall"
|
|
||||||
"testing"
|
"testing"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
@ -26,13 +25,12 @@ import (
|
||||||
// per this process can be retrieved.
|
// per this process can be retrieved.
|
||||||
func TestFileDescriptorLimits(t *testing.T) {
|
func TestFileDescriptorLimits(t *testing.T) {
|
||||||
target := 4096
|
target := 4096
|
||||||
var limit syscall.Rlimit
|
|
||||||
hardlimit, err := getFdMaxLimit()
|
hardlimit, err := getFdMaxLimit()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if hardlimit < target {
|
if hardlimit < target {
|
||||||
t.Skip(fmt.Sprintf("system limit is less than desired test target: %d < %d", limit.Max, target))
|
t.Skip(fmt.Sprintf("system limit is less than desired test target: %d < %d", hardlimit, target))
|
||||||
}
|
}
|
||||||
|
|
||||||
if limit, err := getFdLimit(); err != nil || limit <= 0 {
|
if limit, err := getFdLimit(); err != nil || limit <= 0 {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue