[release-branch.go1.10] misc/cgo/testcshared: use file descriptor 30 for TestUnexportedSymbols

Backport of CL 108537 to 1.10 release branch.

We were using file descriptor 100, which requires the Linux kernel to
grow the fdtable size. That step may sometimes require a long time,
causing the test to fail. Switch to file descriptor 30, which should
not require growing the fdtable.

Updates #23784
Fixes #25277

Change-Id: I9d25986f3b59bdeb04aa52407b24aa94712aedff
Reviewed-on: https://go-review.googlesource.com/111995
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Ian Lance Taylor 2018-04-20 14:43:17 -07:00
parent f858dbd1f0
commit 516f5ccf57
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@
#include <time.h>
#include <unistd.h>
#define fd (100)
#define fd (30)
// Tests libgo2.so, which does not export any functions.
// Read a string from the file descriptor and print it.

View File

@ -21,7 +21,7 @@ import (
// that the C code can also use.
const (
fd = 100
fd = 30
)
func init() {