Skip to content

Commit 0ce6af9

Browse files
[release-branch.go1.9] misc/cgo/testcshared: use file descriptor 30 for TestUnexportedSymbols
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 golang#23784 Fixes golang#25278 Change-Id: I19ea6ab1724ec1807643d5111c44631e20be76b0 Reviewed-on: https://go-review.googlesource.com/111996 Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Brad Fitzpatrick <[email protected]>
1 parent 20f58c6 commit 0ce6af9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

misc/cgo/testcshared/main2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <time.h>
1010
#include <unistd.h>
1111

12-
#define fd (100)
12+
#define fd (30)
1313

1414
// Tests libgo2.so, which does not export any functions.
1515
// Read a string from the file descriptor and print it.

misc/cgo/testcshared/src/libgo2/libgo2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import (
2121
// that the C code can also use.
2222

2323
const (
24-
fd = 100
24+
fd = 30
2525
)
2626

2727
func init() {

0 commit comments

Comments
 (0)