]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.9] misc/cgo/testcshared: use file descriptor 30 for TestUnexporte...
authorIan Lance Taylor <iant@golang.org>
Fri, 20 Apr 2018 21:43:17 +0000 (14:43 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 8 May 2018 16:30:47 +0000 (16:30 +0000)
Backport of CL 108537 to 1.9 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 #25278

Change-Id: I19ea6ab1724ec1807643d5111c44631e20be76b0
Reviewed-on: https://go-review.googlesource.com/111996
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
misc/cgo/testcshared/main2.c
misc/cgo/testcshared/src/libgo2/libgo2.go

index 6e8bf141cafa81ea340b12112395d3d163518421..1a3f1d7545fc2f93ecdaeb20643a7f4e689ac5aa 100644 (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.
index 1b69d8f09fa33c8f161037bc9260e10f4cf97463..e57c93b77d739b5e7ddf180e33234854088b55ff 100644 (file)
@@ -21,7 +21,7 @@ import (
 // that the C code can also use.
 
 const (
-       fd = 100
+       fd = 30
 )
 
 func init() {