Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(689)

Issue 5500094: code review 5500094: misc/cgo/test: make tests run on windows (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
12 years, 4 months ago by brainman
Modified:
12 years, 3 months ago
Reviewers:
CC:
golang-dev, vcc, rsc
Visibility:
Public.

Description

misc/cgo/test: make tests run on windows - use proper Win64 gcc calling convention when calling initcgo on amd64 - increase g0 stack size to 64K on amd64 to make it the same as 386 - implement C.sleep - do not use C.stat, since it is renamed to C._stat by mingw - use fopen to implement TestErrno, since C.strtol always succeeds on windows - skip TestSetEnv on windows, because os.Setenv sets windows process environment, while C.getenv inspects internal C runtime variable instead

Patch Set 1 #

Patch Set 2 : diff -r 7ec969250bfc https://go.googlecode.com/hg/ #

Patch Set 3 : diff -r 7ec969250bfc https://go.googlecode.com/hg/ #

Patch Set 4 : diff -r 7ec969250bfc https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 5 : diff -r fa49a85c5941 https://go.googlecode.com/hg/ #

Patch Set 6 : diff -r 25879029ed5b https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -17 lines) Patch
M misc/cgo/test/Makefile View 1 2 3 4 1 chunk +17 lines, -0 lines 0 comments Download
M misc/cgo/test/basic.go View 1 2 chunks +11 lines, -14 lines 0 comments Download
M misc/cgo/test/env.go View 1 1 chunk +9 lines, -0 lines 0 comments Download
M misc/cgo/test/issue1560.go View 1 1 chunk +2 lines, -0 lines 0 comments Download
A misc/cgo/test/sleep_windows.go View 1 1 chunk +16 lines, -0 lines 0 comments Download
M src/pkg/runtime/asm_amd64.s View 1 2 3 4 2 chunks +4 lines, -2 lines 0 comments Download
M src/run.bash View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 13
brainman
Hello golang-dev@googlegroups.com, I'd like you to review this change to https://go.googlecode.com/hg/
12 years, 4 months ago (2011-12-30 04:36:49 UTC) #1
brainman
Hello golang-dev@googlegroups.com (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 4 months ago (2011-12-30 04:59:48 UTC) #2
vcc
http://codereview.appspot.com/5500094/diff/5001/misc/cgo/test/callback_c.c File misc/cgo/test/callback_c.c (right): http://codereview.appspot.com/5500094/diff/5001/misc/cgo/test/callback_c.c#newcode14 misc/cgo/test/callback_c.c:14: // with "__chkstk: not defined" during build __chkstk in ...
12 years, 4 months ago (2012-01-05 03:06:44 UTC) #3
brainman
http://codereview.appspot.com/5500094/diff/5001/misc/cgo/test/callback_c.c File misc/cgo/test/callback_c.c (right): http://codereview.appspot.com/5500094/diff/5001/misc/cgo/test/callback_c.c#newcode14 misc/cgo/test/callback_c.c:14: // with "__chkstk: not defined" during build Made this ...
12 years, 4 months ago (2012-01-05 05:53:28 UTC) #4
vcc
2012/1/5 <alex.brainman@gmail.com>: > ... and it works on 386. But test program crashing on amd64, ...
12 years, 4 months ago (2012-01-05 07:09:39 UTC) #5
vcc
volatile char data[7*1024+320]; // OK volatile char data[7*1024+321]; // crash 2012/1/5 Wei guangjing <vcc.163@gmail.com>: > ...
12 years, 4 months ago (2012-01-05 07:29:23 UTC) #6
brainman
Hello golang-dev@googlegroups.com, vcc.163@gmail.com (cc: golang-dev@googlegroups.com), Please take another look.
12 years, 4 months ago (2012-01-06 05:28:57 UTC) #7
vcc
LGTM On 2012/01/06 05:28:57, brainman wrote: > Hello mailto:golang-dev@googlegroups.com, mailto:vcc.163@gmail.com (cc: > mailto:golang-dev@googlegroups.com), > > ...
12 years, 4 months ago (2012-01-06 05:35:27 UTC) #8
rsc
I am confused about the misc/cgo/test/Makefile changes. When we switch to the go tool that ...
12 years, 3 months ago (2012-01-09 17:19:55 UTC) #9
brainman
On 2012/01/09 17:19:55, rsc wrote: > ... What is going on? It seems volatile char ...
12 years, 3 months ago (2012-01-10 04:15:57 UTC) #10
brainman
Russ, Can I submit this? There are some bug fixes in src/pkg/runtime/asm_amd64.s. We can leave ...
12 years, 3 months ago (2012-01-18 04:07:03 UTC) #11
rsc
LGTM
12 years, 3 months ago (2012-01-19 21:09:43 UTC) #12
brainman
12 years, 3 months ago (2012-01-20 01:59:52 UTC) #13
*** Submitted as http://code.google.com/p/go/source/detail?r=cc1fb54d8263 ***

misc/cgo/test: make tests run on windows

- use proper Win64 gcc calling convention when
  calling initcgo on amd64
- increase g0 stack size to 64K on amd64 to make
  it the same as 386
- implement C.sleep
- do not use C.stat, since it is renamed to C._stat by mingw
- use fopen to implement TestErrno, since C.strtol
  always succeeds on windows
- skip TestSetEnv on windows, because os.Setenv
  sets windows process environment, while C.getenv
  inspects internal C runtime variable instead

R=golang-dev, vcc.163, rsc
CC=golang-dev
http://codereview.appspot.com/5500094
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b