steed icon indicating copy to clipboard operation
steed copied to clipboard

fix unit tests

Open japaric opened this issue 9 years ago • 9 comments

  • [ ] src/collections/hash/map.rs - doesn't compile

    • Depends on thread_local!. cc #30
  • [ ] src/fs.rs - doesn't compile

    • Depends on sys_common::io::test::TempDir. cc #116
  • [x] src/io/buffered.rs - doesn't compile

    • Depends on thread. cc #13
  • [ ] src/net/addr.rs - doesn't compile

    • Depends on std::net::test, which depends on std::env. cc #69
  • [ ] src/net/ip.rs - doesn't compile

    • Depends on std::net::test, which depends on std::env. cc #69
  • [ ] src/net/tcp.rs - doesn't compile

    • Depends on std::net::test, which depends on std::env. cc #69
  • [ ] src/net/udp.rs - doesn't compile

    • Depends on std::net::test, which depends on std::env. cc #69
    • Depends on std::thread. cc #13
    • Depends on std::sync::mpsc::channel. cc #117
  • [x] src/os/raw.rs - doesn't compile

    • Missing types in lib: c_schar, c_short, etc.
  • [ ] src/process.rs - doesn't compile

    • Incomplete Command API. cc #11
    • Missing functions in libc. getuid, getgid, etc.
  • [ ] src/rand/mod.rs - doesn't compile

    • Depends on std::thread. cc #13
    • Depends on std::sync::mpsc::channel. cc #117
  • [ ] src/sys/linux/ext/net.rs - doesn't compile

    • Depends on std::thread. cc #13
    • Depends on sys_common::io::test::TempDir. cc #116
  • [ ] src/sys/linux/process.rs - doesn't compile

    • Missing stuff in libc. sigset_t, SIGINT, etc.
    • Incomplete Command API. cc #11
  • [ ] src/sys_common/io.rs - doesn't compile

    • Depends on std::env. cc #69
  • [ ] src/sys_common/net.rs - doesn't compile

    • Depends on lookup_host. cc #101

japaric avatar Feb 25 '17 16:02 japaric

updated cc @tbu-

japaric avatar Feb 25 '17 20:02 japaric

Thanks, being able to run the test suite is great!

Looks like quite a bit could be gained by implementing env. What's the state of #72?

tbu- avatar Feb 25 '17 20:02 tbu-

@tbu- It breaks the powerpc (iirc?) target but works everywhere else. Wasn't sure if it was ok to drop support for one target ...

japaric avatar Feb 25 '17 21:02 japaric

or to be more specific, the startup (before main) stuff of the powepc target is already flaky. #72 requires doing more startup stuff which finishes breaking the powerpc target :-)

japaric avatar Feb 25 '17 21:02 japaric

In what context is the execution of the unit tests? It seems that std::rt::start is not executed when trying to cross test.

tbu- avatar Apr 23 '17 08:04 tbu-

In what context is the execution of the unit tests?

rustc will insert a vanilla main function into the library crate turning it into a binary crate so the test runner should behave like a normal program and execute _start and then std::rt::start and then main.

japaric avatar Apr 23 '17 13:04 japaric

Mh. It didn't print when I inserted a println! into the std::rt::start function.

tbu- avatar Apr 23 '17 13:04 tbu-

@tbu- I have sent you an invite to become a collaborator of this repo :tada:. Could you check off the tests that have been fixed in the issue description?

japaric avatar Apr 23 '17 13:04 japaric

Thank you. Did that.

tbu- avatar Apr 23 '17 14:04 tbu-