japaric/steed

fix unit tests

Opened this issue · 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
  • 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
  • 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

updated
cc @tbu-

tbu- commented

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- It breaks the powerpc (iirc?) target but works everywhere else. Wasn't sure if it was ok to drop support for one target ...

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 :-)

tbu- commented

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

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.

tbu- commented

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

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

tbu- commented

Thank you. Did that.