Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/dist: get testcarchive working on iOS #8345

Closed
crawshaw opened this issue Jul 8, 2014 · 11 comments
Closed

cmd/dist: get testcarchive working on iOS #8345

crawshaw opened this issue Jul 8, 2014 · 11 comments
Assignees
Milestone

Comments

@crawshaw
Copy link
Contributor

@crawshaw crawshaw commented Jul 8, 2014

cl/110400043 disables some tests because of the lack of compiler on android. Find a way
to get them working again.
@minux
Copy link
Member

@minux minux commented Jul 8, 2014

Comment 1:

Labels changed: added repo-main, release-go1.4.

@crawshaw
Copy link
Contributor Author

@crawshaw crawshaw commented Jul 8, 2014

Comment 2:

In particular:
- the runtime tests that depend on a compiler on the target. (e.g. crash_test.go)
- the cgo tests in run.bash that depend on test/run.go
The latter will require plumbing knowledge of GOHOSTOS/GOOS through run.go.
@minux
Copy link
Member

@minux minux commented Jul 8, 2014

Comment 3:

misc/cgo tests breakdown:
misc/cgo/stdio, misc/cgo/life aren't important, they are just cgo examples;
misc/cgo/test: the most important one, shouldn't be too hard to run;
misc/cgo/testcdefs: should be covered by other systems;
misc/cgo/testso: test cgo could link dynamic libraries, covered by normal android cgo
usage;
misc/cgo/testasan: not relevant on 32-bit systems;
misc/cgo/errors: covered by other systems.
In summary: we need to run misc/cgo/test and various crash tests from runtime.
I don't think we need to modify test/run.go.
@rsc
Copy link
Contributor

@rsc rsc commented Sep 18, 2014

Comment 4:

Labels changed: added release-go1.5, removed release-go1.4.

@crawshaw crawshaw added new labels Sep 18, 2014
@crawshaw crawshaw self-assigned this Sep 18, 2014
@bradfitz bradfitz modified the milestone: Go1.5 Dec 16, 2014
@crawshaw crawshaw changed the title runtime: get cgo tests working on android runtime: get cgo tests working on android/iOS Mar 19, 2015
@crawshaw crawshaw modified the milestones: Go1.5Maybe, Go1.5 Mar 19, 2015
@crawshaw
Copy link
Contributor Author

@crawshaw crawshaw commented Mar 19, 2015

For iOS, this is very close to working. The sticking point is TestCthread:

* thread #6: tid = 0x8de56, 0x040ac240 gotest`/Users/crawshaw/ios/go/misc/cgo/test.Add + 124, stop reason = EXC_BAD_ACCESS (code=1, address=0x0)
  * frame #0: 0x040ac240 gotest`/Users/crawshaw/ios/go/misc/cgo/test.Add + 124
    frame #1: 0x04059aa8 gotest`runtime.call16 + 112
    frame #2: 0x04009efc gotest`runtime.cgocallbackg1 + 204
    frame #3: 0x04009e10 gotest`runtime.cgocallbackg + 128
    frame #4: 0x0405ba50 gotest`runtime.cgocallback_gofunc + 108
    frame #5: 0x0405c404 gotest`runtime.goexit + 4

This is a slightly gnarlier version of #10043. In this instance, our EXC_BAD_ACCESS handler isn't be activated because the cgo callback is being run on a foreign thread. For foreign threads we have never had an opportunity to grab the mach_task_port.

One potential solution is to steal the pthread_create symbol and register the task port then.

crawshaw added a commit that referenced this issue Mar 19, 2015
This CL updates a TODO on a condition excluding a lot of tests on
android, clarifying what needs to be done. Several of the tests should
be turned off, for example anything depending on the Go tool, others
should be enabled. (See #8345, comment 3 for more details.)

Also add iOS, which has the same set of restrictions.

Tested manually on linux/amd64, darwin/amd64, android/arm, darwin/arm.

Updates #8345

Change-Id: I147f0a915426e0e0de9a73f9aea353766156609b
Reviewed-on: https://go-review.googlesource.com/7734
Reviewed-by: Burcu Dogan <jbd@google.com>
@minux
Copy link
Member

@minux minux commented Mar 19, 2015

@rsc rsc removed the repo-main label Apr 14, 2015
@gopherbot
Copy link

@gopherbot gopherbot commented May 8, 2015

CL https://golang.org/cl/9891 mentions this issue.

@gopherbot
Copy link

@gopherbot gopherbot commented May 8, 2015

CL https://golang.org/cl/6823 mentions this issue.

@gopherbot
Copy link

@gopherbot gopherbot commented May 8, 2015

CL https://golang.org/cl/9890 mentions this issue.

@crawshaw crawshaw modified the milestones: Go1.6, Go1.5Maybe Jul 14, 2015
@crawshaw
Copy link
Contributor Author

@crawshaw crawshaw commented Jul 14, 2015

Many tests now run, but there's still a few more that would be nice. Punting what's left to 1.6.

@rsc rsc modified the milestones: Unplanned, Go1.6 Nov 5, 2015
@crawshaw crawshaw changed the title runtime: get cgo tests working on android/iOS cmd/dist: get testcarchive working on iOS Mar 24, 2016
@gopherbot
Copy link

@gopherbot gopherbot commented Mar 24, 2016

CL https://golang.org/cl/21102 mentions this issue.

@gopherbot gopherbot closed this in 0a82ed5 Mar 24, 2016
@golang golang locked and limited conversation to collaborators Mar 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.