Merge changes I4d0b27ba,Ic48e9cf2 into main am: 4ade19fe94
am: e7601cc83d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2823833 Change-Id: I4152b7a97b3d7457c4319a1d2a653dec14c7db9d Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -811,7 +811,7 @@ func TestReverseSlice(t *testing.T) {
|
||||
if !reflect.DeepEqual(slice, testCase.expected) {
|
||||
t.Errorf("expected %#v, got %#v", testCase.expected, slice)
|
||||
}
|
||||
if slice != nil && unsafe.SliceData(testCase.in) == unsafe.SliceData(slice) {
|
||||
if cap(slice) > 0 && unsafe.SliceData(testCase.in) == unsafe.SliceData(slice) {
|
||||
t.Errorf("expected slices to have different backing arrays")
|
||||
}
|
||||
})
|
||||
|
@@ -692,9 +692,11 @@ func setMaxFiles(ctx build.Context) {
|
||||
}
|
||||
|
||||
ctx.Verbosef("Current file limits: %d soft, %d hard", limits.Cur, limits.Max)
|
||||
if limits.Cur == limits.Max {
|
||||
return
|
||||
}
|
||||
|
||||
// Go 1.21 modifies the file limit but restores the original when
|
||||
// execing subprocesses if it hasn't be overridden. Call Setrlimit
|
||||
// here even if it doesn't appear to be necessary so that the
|
||||
// syscall package considers it set.
|
||||
|
||||
limits.Cur = limits.Max
|
||||
err = syscall.Setrlimit(syscall.RLIMIT_NOFILE, &limits)
|
||||
|
Reference in New Issue
Block a user