diff options
author | Ian Lance Taylor <iant@golang.org> | 2018-04-20 14:43:17 -0700 |
---|---|---|
committer | Ian Lance Taylor <iant@golang.org> | 2018-05-08 16:30:25 +0000 |
commit | 516f5ccf57560ed402cdae28a36e1dc9e81444c3 (patch) | |
tree | c77f6b0e81bcd8612a89f8642a97139c8034ec0b | |
parent | f858dbd1f0546d7f9366d295eb7cf17059e45822 (diff) | |
download | go-516f5ccf57560ed402cdae28a36e1dc9e81444c3.tar.gz go-516f5ccf57560ed402cdae28a36e1dc9e81444c3.zip |
[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>
-rw-r--r-- | misc/cgo/testcshared/main2.c | 2 | ||||
-rw-r--r-- | misc/cgo/testcshared/src/libgo2/libgo2.go | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/misc/cgo/testcshared/main2.c b/misc/cgo/testcshared/main2.c index 6e8bf141ca..1a3f1d7545 100644 --- a/misc/cgo/testcshared/main2.c +++ b/misc/cgo/testcshared/main2.c @@ -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. diff --git a/misc/cgo/testcshared/src/libgo2/libgo2.go b/misc/cgo/testcshared/src/libgo2/libgo2.go index 1b69d8f09f..e57c93b77d 100644 --- a/misc/cgo/testcshared/src/libgo2/libgo2.go +++ b/misc/cgo/testcshared/src/libgo2/libgo2.go @@ -21,7 +21,7 @@ import ( // that the C code can also use. const ( - fd = 100 + fd = 30 ) func init() { |