From 0a129dbca6b76e919041d759e8d9a23fc075e6d5 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Fri, 20 Apr 2018 14:43:17 -0700 Subject: [PATCH] misc/cgo/testcshared: use file descriptor 30 for TestUnexportedSymbols 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. Fixes #23784 Change-Id: I3ac40d6f8569c70d34b470cfca34eff149bf8229 Reviewed-on: https://go-review.googlesource.com/108537 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Austin Clements --- misc/cgo/testcshared/main2.c | 2 +- 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 ec5ec8f0d0..f89bcca474 100644 --- a/misc/cgo/testcshared/main2.c +++ b/misc/cgo/testcshared/main2.c @@ -9,7 +9,7 @@ #include #include -#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() { -- 2.50.0