Test results for D on Android/ARM

Joakim via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Sun Nov 8 01:49:16 PST 2015

On Friday, 6 November 2015 at 19:23:17 UTC, Jakob Ovrum wrote:
> Android: 4.4.4
> Cyanogenmod: 11-20141115-UNOFFICIAL-M12-ace
> Model: HTC Desire HD (aka Ace)
> Chipset: Qualcomm MSM8255 Snapdragon S2
> Rooted.
> With the APK everything passes, but from the command line (as 
> root with SSHDroid) I get:
> No service for epmap.
> ****** FAIL release32 std.socket
> std.socket.SocketOSException@/home/bert/ldc/runtime/phobos/std/socket.d(2783): Unable to bind socket: Operation not permitted
> ****** FAIL release32 std.file
> std.file.FileException@/home/bert/ldc/runtime/phobos/std/file.d(1091): /storage/sdcard0/Download/deleteme.dmd.unittest.pid5691_slink

They're both related to accessing files, whether a socket file or 
a symbolic link.  Given that they pass from the apk, my guess is 
that this is related to user/file permissions because you're 
running as root from the Download directory.  Can you try running 
as a normal user in the local folder for SSHDroid, as described 


> 0.032s PASS release32 std.internal.math.gammafunction
> [1] + Segmentation fault   ./test-runner
> There was a significant delay between the pass for 
> std.internal.math.gammafunction and the segfault. How would I 
> go about getting gdb on the device (or is there a different 
> command line debugger I can use)?

With some builds, I used to get an issue with core.thread 
interacting with the static destructor for std.parallelism, which 
would cause a segfault on exit.  This could be that issue.

As for debugging, the NDK comes with an ARM gdb server, found in 
prebuilt/android-arm/gdbserver/gdbserver, which you can use with 
their gdb to remotely debug Android apps.  Simply copy the ARM 
gdbserver to the same directory as the command-line test runner 
on your Android device, then run this command:

./gdbserver :1234 ./test-runner

On your development host with the NDK, run this command, where 
$NDK is the path to your NDK, 1234 is the random port at which 
the gdb server is listening, and is the IP of your 
Android device:

$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-gdb -ex "target extended-remote" ./path/to/test-runner

Make sure you have that last path, a copy of the same test runner 
on the development host that you're running on the Android 
device, so gdb can load its symbols.

After that, you should be to rerun the test runner as many times 
as you want, as it's in multi-process mode and you can restart as 
many processes as you want.  When you're done, simply type 
'monitor exit' to kill the gdb server remotely before quitting 

More information about the digitalmars-d-ldc mailing list