-
Notifications
You must be signed in to change notification settings - Fork 30.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
test failures on Android #1430
Comments
Tomorrow I am going to run the tests and check if I can patch some tests. I am seeing that the build of iojs is not working on
@shigeki could you give the result of Added to it, I want to work on fix the way |
I suspect that's because of the pthread_sigmask() in PlatformInit; IIRC, in Android it was broken until Jellybean. Can you try this patch? diff --git a/src/node.cc b/src/node.cc
index 67cf140..f32a1a0 100644
--- a/src/node.cc
+++ b/src/node.cc
@@ -3463,7 +3463,13 @@ inline void PlatformInit() {
sigset_t sigmask;
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGUSR1);
- const int err = pthread_sigmask(SIG_SETMASK, &sigmask, nullptr);
+ int err = pthread_sigmask(SIG_SETMASK, &sigmask, nullptr);
+
+#ifdef __ANDROID__
+ // Android < 4.1 has a broken pthread_sigmask() implementation.
+ if (err == EINVAL)
+ err = sigprocmask(SIG_SETMASK, &sigmask, nullptr);
+#endif
// Make sure file descriptors 0-2 are valid before we start logging anything.
for (int fd = STDIN_FILENO; fd <= STDERR_FILENO; fd += 1) { |
@Gioyik I never had such an error on my Android (Lolipop) so probably it comes from the issue that is pointed out by Ben. My device's output is root@mako:/ # uname -a
Linux localhost 3.4.0-perf-g16e203d #1 SMP PREEMPT Wed Nov 19 05:47:52 UTC 2014 armv7l GNU/Linux
root@mako:/ # grep -e ro.product.cpu -e ro.build.version /system/build.prop and build.prop is in https://gist.github.com/shigeki/9a5db4c9ea0e3da978fd . I made tentative fixes to pass all the tests on my Android in https://github.com/shigeki/io.js/tree/android-fix . |
Is it not-onerous to get an update on this? I don't suppose it's been quietly fixed in the last nine months or something? |
I don't have an android device to run tests on Android now. So I close this. |
As commented in #1396 (comment) , several tests fails on Android.
Some of them can be tentatively fixed by a small patch but 18 failures still remains.
The patch and full test results( --mode=release message parallel sequential) are show in
https://gist.github.com/shigeki/fd25f15657f058ceccea and the list of failures are
$ grep 'not ok' test_out.txt not ok 16 - test-child-process-default-options.js not ok 20 - test-child-process-env.js not ok 23 - test-child-process-exec-env.js not ok 59 - test-cluster-bind-privileged-port.js not ok 87 - test-cluster-shared-handle-bind-privileged-port.js not ok 202 - test-fs-access.js not ok 229 - test-fs-readfile-pipe.js not ok 230 - test-fs-readfile-pipe-large.js not ok 233 - test-fs-readfilesync-pipe-large.js not ok 262 - test-http-304.js not ok 307 - test-http-curl-chunk-problem.js not ok 321 - test-http-full-response.js not ok 415 - test-https-simple.js not ok 477 - test-net-pipe-connect-errors.js not ok 514 - test-process-config.js not ok 577 - test-stdio-closed.js not ok 779 - test-child-process-execsync.js not ok 785 - test-fs-watch.js
4 failures are because process.getuid is
undefined
on Android and some of them can be fixed by changing to invoke external commands. It needs more investigations.CC: @Gioyik
The text was updated successfully, but these errors were encountered: