mirror of https://github.com/golang/go.git
misc/cgo/testcshared: increase sleep in TestUnexportedSymbols
Increase the sleep and wait for up to 2 seconds for the dup2. Apparently it can sometimes take a long time. Fixes #23784 Change-Id: I929530b057bbcd842b28a7640c39dd68d719ff7d Reviewed-on: https://go-review.googlesource.com/93895 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:
parent
03f27d5f58
commit
3773cbba72
|
|
@ -21,7 +21,7 @@ int main(void) {
|
||||||
|
|
||||||
// The descriptor will be initialized in a thread, so we have to
|
// The descriptor will be initialized in a thread, so we have to
|
||||||
// give a chance to get opened.
|
// give a chance to get opened.
|
||||||
for (i = 0; i < 1000; i++) {
|
for (i = 0; i < 200; i++) {
|
||||||
n = read(fd, buf, sizeof buf);
|
n = read(fd, buf, sizeof buf);
|
||||||
if (n >= 0)
|
if (n >= 0)
|
||||||
break;
|
break;
|
||||||
|
|
@ -33,7 +33,7 @@ int main(void) {
|
||||||
// An EBADF error means that the shared library has not opened the
|
// An EBADF error means that the shared library has not opened the
|
||||||
// descriptor yet.
|
// descriptor yet.
|
||||||
ts.tv_sec = 0;
|
ts.tv_sec = 0;
|
||||||
ts.tv_nsec = 1000000;
|
ts.tv_nsec = 10000000;
|
||||||
nanosleep(&ts, NULL);
|
nanosleep(&ts, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue