November 06, 2015
Using the APK on a Note 4 with Snapdragon 805 running CyanogenMod 12 Nightly (5.1.1, build 20151015), all tests passed(!) and nothing hung. Awesome to see this.

November 06, 2015
Tested on Samsung Galaxy Grand I9082, Android 4.2.2, Cortex A9 using the APK.

All tests pass except for one in std.datetime due to a wrong test with my timezone (https://issues.dlang.org/show_bug.cgi?id=9488) (happens on desktop too).

Great work!

0.000s PASS core.atomic
0.031s PASS core.bitop
0.000s PASS core.checkedint
0.005s PASS core.memory
0.000s PASS core.exception
0.000s PASS core.math
0.015s PASS core.demangle
0.521s PASS core.time
0.289s PASS core.thread
0.000s PASS core.internal.convert
0.000s PASS core.internal.hash
0.000s PASS core.sync.config
0.003s PASS core.sync.mutex
0.026s PASS core.sync.condition
0.014s PASS core.sync.barrier
0.008s PASS core.sync.rwmutex
0.000s PASS core.sys.posix.sys.select
0.001s PASS object
0.000s PASS rt.aaA
0.000s PASS rt.arraybyte
0.000s PASS rt.arrayassign
0.000s PASS rt.cover
0.000s PASS rt.arraycast
0.000s PASS rt.minfo
0.001s PASS rt.arraydouble
0.000s PASS rt.qsort
0.000s PASS rt.typeinfo.ti_Aint
0.000s PASS rt.adi
0.018s PASS rt.lifetime
0.000s PASS rt.monitor_
0.000s PASS rt.arrayreal
0.000s PASS rt.arrayfloat
0.000s PASS rt.util.string
0.001s PASS rt.util.utf
0.000s PASS rt.util.hash
0.179s PASS rt.util.container.treap
0.000s PASS rt.util.container.hashtab
0.000s PASS rt.util.container.array
0.000s PASS rt.util.typeinfo
0.000s PASS rt.arrayshort
0.000s PASS rt.aApply
0.000s PASS rt.switch_
0.002s PASS rt.arrayint
0.000s PASS rt.aApplyR
0.000s PASS gc.config
0.000s PASS gc.gc
0.000s PASS gc.bits
0.000s PASS gc.pooltable
0.000s PASS std.typetuple
0.028s PASS std.format
0.066s PASS std.conv
16.738s PASS std.random
0.424s PASS std.uni
0.008s PASS std.encoding
0.008s PASS std.zip
0.029s PASS std.variant
0.004s PASS std.mmfile
0.029s PASS std.path
1.555s PASS std.process
****** FAIL std.datetime
core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/datetime.d
(1457): [1999-Jul-31 01:00:00] [1999-Jul-31 00:00:00]
0.000s PASS std.cstream
0.001s PASS std.meta
4.757s PASS std.socket
0.000s PASS std.signals
0.000s PASS std.typelist
0.001s PASS std.outbuffer
0.502s PASS std.stdio
0.002s PASS std.csv
0.003s PASS std.xml
0.000s PASS std.mathspecial
0.005s PASS std.exception
0.002s PASS std.math
0.023s PASS std.uuid
0.104s PASS std.string
0.001s PASS std.traits
0.002s PASS std.ascii
0.000s PASS std.complex
0.004s PASS std.functional
0.011s PASS std.typecons
0.004s PASS std.getopt
0.014s PASS std.utf
0.912s PASS std.uri
0.021s PASS std.stream
0.036s PASS std.concurrency
0.009s PASS std.bitmanip
0.039s PASS std.array
0.019s PASS std.bigint
0.001s PASS std.base64
0.094s PASS std.zlib
4.073s PASS std.parallelism
0.001s PASS std.json
0.002s PASS std.numeric
0.117s PASS std.file
0.042s PASS std.algorithm.searching
0.017s PASS std.algorithm.setops
0.009s PASS std.algorithm.mutation
0.059s PASS std.algorithm.sorting
0.003s PASS std.algorithm.comparison
0.013s PASS std.algorithm.iteration
0.000s PASS std.container
0.005s PASS std.container.util
0.000s PASS std.container.binaryheap
0.032s PASS std.container.rbtree
0.003s PASS std.container.array
0.000s PASS std.container.slist
0.000s PASS std.container.dlist
0.079s PASS std.digest.md
0.034s PASS std.digest.crc
0.118s PASS std.digest.ripemd
1.190s PASS std.digest.sha
0.155s PASS std.digest.digest
0.000s PASS std.experimental.logger.nulllogger
0.318s PASS std.experimental.logger.core
0.001s PASS std.experimental.logger.filelogger
0.000s PASS std.experimental.logger.multilogger
0.007s PASS std.net.curl
0.028s PASS std.net.isemail
0.017s PASS std.range
0.009s PASS std.range.primitives
0.000s PASS std.range.interfaces
0.015s PASS std.regex
0.000s PASS std.regex.internal.ir
0.000s PASS std.regex.internal.backtracking
0.013s PASS std.regex.internal.generator
0.004s PASS std.regex.internal.parser
0.578s PASS std.regex.internal.tests
0.001s PASS std.regex.internal.kickstart
0.000s PASS std.internal.cstring
0.000s PASS std.internal.scopebuffer
0.000s PASS std.internal.math.biguintcore
0.000s PASS std.internal.math.biguintnoasm
0.000s PASS std.internal.math.errorfunction
0.000s PASS std.internal.math.gammafunction
November 06, 2015
On Sunday, 1 November 2015 at 05:44:04 UTC, Joakim wrote:
> I've been running the druntime and phobos tests from the master 2.068 branch on various Android devices.  Please try out the Android test runners I just made available and report your own results in this thread:
>
> https://github.com/joakim-noah/android/releases/tag/runners

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:

0.106s PASS release32 core.atomic
0.086s PASS release32 core.bitop
0.000s PASS release32 core.checkedint
0.006s PASS release32 core.memory
0.000s PASS release32 core.exception
0.000s PASS release32 core.math
0.012s PASS release32 core.demangle
1.348s PASS release32 core.time
0.640s PASS release32 core.thread
0.000s PASS release32 core.internal.convert
0.000s PASS release32 core.internal.hash
0.000s PASS release32 core.sync.config
0.008s PASS release32 core.sync.mutex
0.027s PASS release32 core.sync.condition
0.018s PASS release32 core.sync.barrier
0.058s PASS release32 core.sync.rwmutex
0.000s PASS release32 core.sys.posix.sys.select
0.043s PASS release32 object
0.000s PASS release32 rt.aaA
0.000s PASS release32 rt.arraybyte
0.000s PASS release32 rt.arrayassign
0.000s PASS release32 rt.cover
0.000s PASS release32 rt.arraycast
0.000s PASS release32 rt.minfo
0.008s PASS release32 rt.arraydouble
0.000s PASS release32 rt.qsort
0.000s PASS release32 rt.typeinfo.ti_Aint
0.000s PASS release32 rt.adi
0.139s PASS release32 rt.lifetime
0.000s PASS release32 rt.monitor_
0.000s PASS release32 rt.arrayreal
0.001s PASS release32 rt.arrayfloat
0.000s PASS release32 rt.util.string
0.000s PASS release32 rt.util.utf
0.000s PASS release32 rt.util.hash
0.478s PASS release32 rt.util.container.treap
0.000s PASS release32 rt.util.container.hashtab
0.000s PASS release32 rt.util.container.array
0.000s PASS release32 rt.util.typeinfo
0.006s PASS release32 rt.arrayshort
0.000s PASS release32 rt.aApply
0.000s PASS release32 rt.switch_
0.003s PASS release32 rt.arrayint
0.000s PASS release32 rt.aApplyR
0.000s PASS release32 gc.config
0.000s PASS release32 gc.gc
0.000s PASS release32 gc.bits
0.000s PASS release32 gc.pooltable
0.000s PASS release32 std.typetuple
lower-case nan not supported, trying NaN
lower-case nan not supported, trying NaN
lower-case nan not supported, trying NaN
0.840s PASS release32 std.format
 --- std.conv(2891) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(2899) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(2907) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(2915) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(2923) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(2931) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(2936) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(2941) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(3002) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
 --- std.conv(3003) test fails if Android earlier than 5.0 ---
 (core.exception.AssertError@/home/bert/ldc/runtime/phobos/std/conv.d(2870): Assertion failure)
0.451s PASS release32 std.conv
52.151s PASS release32 std.random
1.572s PASS release32 std.uni
0.034s PASS release32 std.encoding
0.181s PASS release32 std.zip
0.073s PASS release32 std.variant
0.080s PASS release32 std.mmfile
0.106s PASS release32 std.path
4.579s PASS release32 std.process
32.452s PASS release32 std.datetime
0.204s PASS release32 std.cstream
0.002s PASS release32 std.meta
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
0.000s PASS release32 std.signals
0.000s PASS release32 std.typelist
0.000s PASS release32 std.outbuffer
1.746s PASS release32 std.stdio
0.198s PASS release32 std.csv
0.002s PASS release32 std.xml
0.065s PASS release32 std.mathspecial
0.115s PASS release32 std.exception
0.002s PASS release32 std.math
0.281s PASS release32 std.uuid
0.288s PASS release32 std.string
0.079s PASS release32 std.traits
0.011s PASS release32 std.ascii
0.004s PASS release32 std.complex
0.045s PASS release32 std.functional
0.127s PASS release32 std.typecons
0.003s PASS release32 std.getopt
0.020s PASS release32 std.utf
4.353s PASS release32 std.uri
0.178s PASS release32 std.stream
0.187s PASS release32 std.concurrency
0.061s PASS release32 std.bitmanip
0.505s PASS release32 std.array
0.199s PASS release32 std.bigint
0.147s PASS release32 std.base64
0.420s PASS release32 std.zlib
10.160s PASS release32 std.parallelism
0.291s PASS release32 std.json
0.001s PASS release32 std.numeric
****** FAIL release32 std.file
std.file.FileException@/home/bert/ldc/runtime/phobos/std/file.d(1091): /storage/sdcard0/Download/deleteme.dmd.unittest.pid5691_slink
0.392s PASS release32 std.algorithm.searching
0.033s PASS release32 std.algorithm.setops
0.144s PASS release32 std.algorithm.mutation
0.336s PASS release32 std.algorithm.sorting
0.254s PASS release32 std.algorithm.comparison
0.005s PASS release32 std.algorithm.iteration
0.000s PASS release32 std.container
0.034s PASS release32 std.container.util
0.000s PASS release32 std.container.binaryheap
0.097s PASS release32 std.container.rbtree
0.100s PASS release32 std.container.array
0.000s PASS release32 std.container.slist
0.000s PASS release32 std.container.dlist
0.285s PASS release32 std.digest.md
0.086s PASS release32 std.digest.crc
0.315s PASS release32 std.digest.ripemd
5.517s PASS release32 std.digest.sha
1.078s PASS release32 std.digest.digest
0.000s PASS release32 std.experimental.logger.nulllogger
1.244s PASS release32 std.experimental.logger.core
0.057s PASS release32 std.experimental.logger.filelogger
0.029s PASS release32 std.experimental.logger.multilogger
0.013s PASS release32 std.net.curl
0.484s PASS release32 std.net.isemail
0.077s PASS release32 std.range
0.020s PASS release32 std.range.primitives
0.200s PASS release32 std.range.interfaces
0.072s PASS release32 std.regex
0.000s PASS release32 std.regex.internal.ir
0.000s PASS release32 std.regex.internal.backtracking
0.062s PASS release32 std.regex.internal.generator
0.030s PASS release32 std.regex.internal.parser
1.554s PASS release32 std.regex.internal.tests
0.002s PASS release32 std.regex.internal.kickstart
0.019s PASS release32 std.internal.cstring
0.000s PASS release32 std.internal.scopebuffer
0.001s PASS release32 std.internal.math.biguintcore
0.000s PASS release32 std.internal.math.biguintnoasm
0.000s PASS release32 std.internal.math.errorfunction
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)?
November 07, 2015
On Sunday, 1 November 2015 at 05:44:04 UTC, Joakim wrote:
> I've been running the druntime and phobos tests from the master 2.068 branch on various Android devices.  Please try out the Android test runners I just made available and report your own results in this thread:

Android 5.1.1, Nexus 7 (Asus), Snapdragon S4 Pro 8064: All tests pass, apk.


November 07, 2015
On Thursday, 5 November 2015 at 05:29:00 UTC, Joakim wrote:
> On Wednesday, 4 November 2015 at 17:51:29 UTC, Austin G wrote:
>> LG G4
>> Android 5.1
>> Snapdragon 808
>> [snip]
>
> That's strange, others have reported no problems with Android 5.1.  Did all these tests hang or simply fail?  When I say hang, I mean the test runner keeps running but nothing happens, so you have to close or kill it.  Whereas if a test asserts, it'll just say that module failed and move on to the next one.
>
> Could be some issue related to threading, given that core.thread is the only druntime module on your list.  The only other cause I can think of is that yours is one of the few ARMv8 chips tested so far, but the others haven't had this problem.  Can you try running the other test runner, the command-line binary if you tried the apk so far, and see if you can reproduce or get some error output?  Thanks for any feedback.

Definitely hung, re-ran the test for each hung module to confirm it was actually hanging. I will re-run with the command line binary as soon as I can get Android to cooperate (not rooted).

November 07, 2015
On Saturday, 7 November 2015 at 18:04:09 UTC, Austin G wrote:
> Definitely hung, re-ran the test for each hung module to confirm it was actually hanging. I will re-run with the command line binary as soon as I can get Android to cooperate (not rooted).

Root is not necessary.  Simply download the command-line test runner to your device, install a terminal app, type 'cd' at the command-line to go to the terminal app's local folder, then copy the test-runner and test.list to that local folder.  You should be able to run it there, as apps can run executables from their local folder.

Alternately, you can install an SSH server app, as discussed on the wiki:

http://wiki.dlang.org/Build_LDC_for_Android#Run_the_druntime_and_phobos_unit_tests
November 08, 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 here?

http://wiki.dlang.org/Build_LDC_for_Android#Run_the_druntime_and_phobos_unit_tests

> 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 192.168.35.7 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 192.168.35.7:1234" ./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 gdb.
November 09, 2015
Android 6.0
Nexus 5
Snapdragon 800

All test pass on apk



November 12, 2015
On Sunday, 8 November 2015 at 09:49:18 UTC, Joakim wrote:
> 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 here?
>
> http://wiki.dlang.org/Build_LDC_for_Android#Run_the_druntime_and_phobos_unit_tests

Running it as root in the home directory (/data/data/berserker.android.apps.sshdroid/home) fixed those errors. I don't know how to add non-root users though.

> 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.

Thanks, I got gdb-server running. In core.thread and some later modules it stops because of SIGUSR1 and SIGUSR2; I guess I should make gdb ignore those? After continuing from all the SIGUSR signals, I get the segfault that occurs after std.internal.math.gammafunction passes:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 22658.22658]
0x4250a364 in core.thread.Thread.getAll() ()
(gdb) bt
#0  0x4250a364 in core.thread.Thread.getAll() ()
#1  0x43236e04 in std.parallelism._sharedStaticDtor7() ()
#2  0x42549758 in rt.minfo.rt_moduleDtor() ()
#3  0x42557e70 in rt_term ()
#4  0x42558120 in _d_run_main ()
#5  0x43e85418 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) info threads
  Id   Target Id         Frame
* 1    Thread 22658.22658 0x4250a364 in core.thread.Thread.getAll() ()

I'm guessing this is the same issue you mentioned.
November 17, 2015
On Thursday, 12 November 2015 at 03:46:07 UTC, Jakob Ovrum wrote:
> On Sunday, 8 November 2015 at 09:49:18 UTC, Joakim wrote:
>> 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 here?
>>
>> http://wiki.dlang.org/Build_LDC_for_Android#Run_the_druntime_and_phobos_unit_tests
>
> Running it as root in the home directory (/data/data/berserker.android.apps.sshdroid/home) fixed those errors. I don't know how to add non-root users though.

Unless you're running sshdroid as root, it should create a temporary user, like all Android apps, and run as that user, regardless of whether you used the login "root" or not.  I've found that the SSH login is irrelevant: you can type in any login for sshdroid and it will accept it, as long as it has the right password, which makes sense because it doesn't really create users of its own.

So you should have been running as the app's user in it's directory, just as I wanted.  I'm uninterested in debugging the user/file permissions issues that come with running elsewhere, especially since that's not allowed unless you're root, ie you can't normally run binaries from the Download/ directory.

>> 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.
>
> Thanks, I got gdb-server running. In core.thread and some later modules it stops because of SIGUSR1 and SIGUSR2; I guess I should make gdb ignore those?

Yes, there's a gdb command for it:

handle SIGUSR1 SIGUSR2 nostop

You can also add "noprint," if you don't even want to be notified that those signals were sent.

> After continuing from all the SIGUSR signals, I get the segfault that occurs after std.internal.math.gammafunction passes:
>
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 22658.22658]
> 0x4250a364 in core.thread.Thread.getAll() ()
> (gdb) bt
> #0  0x4250a364 in core.thread.Thread.getAll() ()
> #1  0x43236e04 in std.parallelism._sharedStaticDtor7() ()
> #2  0x42549758 in rt.minfo.rt_moduleDtor() ()
> #3  0x42557e70 in rt_term ()
> #4  0x42558120 in _d_run_main ()
> #5  0x43e85418 in ?? ()
> Backtrace stopped: previous frame identical to this frame (corrupt stack?)
> (gdb) info threads
>   Id   Target Id         Frame
> * 1    Thread 22658.22658 0x4250a364 in core.thread.Thread.getAll() ()
>
> I'm guessing this is the same issue you mentioned.

Yep, that's it.  Guessing it's some sort of race on exit, since it doesn't always happen.  You can remove core.thread from test.list to confirm that it's the same reason.
1 2 3 4 5