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

fix to pass 3 tests in rt::io::signal::test on android #10378

Closed
yichoi opened this issue Nov 9, 2013 · 10 comments
Closed

fix to pass 3 tests in rt::io::signal::test on android #10378

yichoi opened this issue Nov 9, 2013 · 10 comments
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-android Operating system: Android

Comments

@yichoi
Copy link
Contributor

yichoi commented Nov 9, 2013

To enable test on android bot #9120

rt::io::signal::test::test_io_signal_smoketest
rt::io::signal::test::test_io_signal_two_signal_one_signum
rt::io::signal::test::test_io_signal_unregister

@alexcrichton
Copy link
Member

Could you paste the errors that you're seeing as well?

@yichoi
Copy link
Contributor Author

yichoi commented Nov 10, 2013

logs are

root@generic:/data/tmp # LD_LIBRARY_PATH=. ./signal

running 3 tests
test test::test_io_signal_smoketest ... root@generic:/data/tmp #

starts test then exits at once.

@alexcrichton
Copy link
Member

Hm, I wonder if it's possible to even catch SIGINT on android? All that test does is send a sigint to itself to make sure that it's caught. Certainly warrants some more investigation.

@ksh8281
Copy link
Contributor

ksh8281 commented Nov 10, 2013

@alexcrichton
yes, i tested on adb with pure c language example program to receive SIGINT,
it runs well.
i send and receive sigusr1 signal itself with rust(without register signal handler),
the program print "user signal1" and die.
and with register signal handler, the program dies too..

@alexcrichton
Copy link
Member

Hm, I don't think that libuv is doing anything super out-of-the-ordinary with signal handling. Just for reference, what was the C program you were using to verify that SIGINT could be captured? I'll take a look at libuv and see if it's deviating seriously in some direction.

@ksh8281
Copy link
Contributor

ksh8281 commented Nov 10, 2013

this is my signal test program.
it works well.

#include<stdio.h>
#include<signal.h>
#include<unistd.h>

void sig_handler(int signo)
{
  if (signo == SIGINT)
    printf("received SIGINT\n");
}

int main(void)
{
  if (signal(SIGINT, sig_handler) == SIG_ERR)
  printf("\ncan't catch SIGINT\n");
  // A long long wait so that we can easily issue a signal to this process
  while(1) 
    sleep(1);
  return 0;
}

@ksh8281
Copy link
Contributor

ksh8281 commented Nov 13, 2013

@alexcrichton
i think signal handling runs normal. but socket is problem in android.
libuv send catched signal event with libuv's internal pipe.
the pipe is implement with socket functions.
without permisson(internet), we cant use socket functions in android.

@pnkfelix
Copy link
Member

(This may be unrelated, but I'm seeing some problems on test_io_signal_two_signal_one_signum when I attempt to swap in the Boehm/BDW conservative GC. I wonder if the difference in timing is exposing some latent problem here.)

@reem
Copy link
Contributor

reem commented Dec 15, 2014

Triage: we no longer use libuv, so that might have changed the story here, but other than that I can't say.

@alexcrichton
Copy link
Member

I believe these tests have long since been removed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc O-android Operating system: Android
Projects
None yet
Development

No branches or pull requests

5 participants