• Elias Naur's avatar
    misc/ios,cmd/go, runtime/cgo: fix iOS test harness (again) · 7523baed
    Elias Naur authored
    The iOS test harness was recently changed in response to lldb bugs
    to replace breakpoints with the SIGUSR2 signal (CL 34926), and to
    pass the current directory in the test binary arguments (CL 35152).
    Both the signal sending and working directory setup is done from
    the go test driver.
    
    However, the new method doesn't work with tests where a C program is
    the test driver instead of go test: the current working directory
    will not be changed and SIGUSR2 is not raised.
    
    Instead of copying that logic into any C test program, rework the
    test harness (again) to move the setup logic to the early runtime
    cgo setup code. That way, the harness will run even in the library
    build modes.
    
    Then, use the app Info.plist file to pass the working
    directory, removing the need to alter the arguments after running.
    
    Finally, use the SIGINT signal instead of SIGUSR2 to avoid
    manipulating the signal masks or handlers.
    
    Fixes the testcarchive tests on iOS.
    
    With this CL, both darwin/arm and darwin/arm64 passes all.bash.
    
    This CL replaces CL 34926, CL 35152 as well as the fixup CL
    35123 and CL 35255. They are reverted in CLs earlier in the
    relation chain.
    
    Change-Id: I8485c7db1404fbd8daa261efd1ea89e905121a3e
    Reviewed-on: https://go-review.googlesource.com/36090
    Run-TryBot: Elias Naur <elias.naur@gmail.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
    7523baed
Name
Last commit
Last update
..
asm_386.s Loading commit data...
asm_amd64.s Loading commit data...
asm_arm.s Loading commit data...
asm_arm64.s Loading commit data...
asm_mips64x.s Loading commit data...
asm_mipsx.s Loading commit data...
asm_nacl_amd64p32.s Loading commit data...
asm_ppc64x.s Loading commit data...
asm_s390x.s Loading commit data...
callbacks.go Loading commit data...
callbacks_traceback.go Loading commit data...
cgo.go Loading commit data...
dragonfly.go Loading commit data...
freebsd.go Loading commit data...
gcc_386.S Loading commit data...
gcc_amd64.S Loading commit data...
gcc_android.c Loading commit data...
gcc_android_386.c Loading commit data...
gcc_android_amd64.c Loading commit data...
gcc_android_arm.c Loading commit data...
gcc_android_arm64.c Loading commit data...
gcc_arm.S Loading commit data...
gcc_arm64.S Loading commit data...
gcc_context.c Loading commit data...
gcc_darwin_386.c Loading commit data...
gcc_darwin_amd64.c Loading commit data...
gcc_darwin_arm.c Loading commit data...
gcc_darwin_arm64.c Loading commit data...
gcc_dragonfly_amd64.c Loading commit data...
gcc_fatalf.c Loading commit data...
gcc_freebsd_386.c Loading commit data...
gcc_freebsd_amd64.c Loading commit data...
gcc_freebsd_arm.c Loading commit data...
gcc_libinit.c Loading commit data...
gcc_libinit_openbsd.c Loading commit data...
gcc_libinit_windows.c Loading commit data...
gcc_linux_386.c Loading commit data...
gcc_linux_amd64.c Loading commit data...
gcc_linux_arm.c Loading commit data...
gcc_linux_arm64.c Loading commit data...
gcc_linux_mips64x.c Loading commit data...
gcc_linux_mipsx.c Loading commit data...
gcc_linux_ppc64x.c Loading commit data...
gcc_linux_s390x.c Loading commit data...
gcc_mips64x.S Loading commit data...
gcc_mipsx.S Loading commit data...
gcc_mmap.c Loading commit data...
gcc_netbsd_386.c Loading commit data...
gcc_netbsd_amd64.c Loading commit data...
gcc_netbsd_arm.c Loading commit data...
gcc_openbsd_386.c Loading commit data...
gcc_openbsd_amd64.c Loading commit data...
gcc_ppc64x.S Loading commit data...
gcc_s390x.S Loading commit data...
gcc_setenv.c Loading commit data...
gcc_sigaction.c Loading commit data...
gcc_signal_darwin_armx.c Loading commit data...
gcc_signal_darwin_lldb.c Loading commit data...
gcc_solaris_amd64.c Loading commit data...
gcc_traceback.c Loading commit data...
gcc_util.c Loading commit data...
gcc_windows_386.c Loading commit data...
gcc_windows_amd64.c Loading commit data...
iscgo.go Loading commit data...
libcgo.h Loading commit data...
libcgo_unix.h Loading commit data...
mmap.go Loading commit data...
netbsd.go Loading commit data...
openbsd.go Loading commit data...
setenv.go Loading commit data...
sigaction.go Loading commit data...
signal_darwin_arm.s Loading commit data...
signal_darwin_arm64.s Loading commit data...
signal_darwin_armx.go Loading commit data...