Skip to content

Support running std tests #7

Closed
Closed
@RalfJung

Description

@RalfJung

Many std tests will not work (since they use FFIs we don't support), but it could still make sense to run some of the tests in std -- for example, the mpsc tests. However, I can't get that to work. I pushed my WIP branch here, but it fails spectacularly -- the build of libs complains that it cannot find any of the things in core. Looks like some of the magic for the rustc workspace is not quite working out here, and I don't know what or how.

core and alloc are fine as they have no external dependencies, but with std, this seems to all fall apart.

   Compiling unwind v0.0.0 (/home/r/src/rust/miri-test-libstd/library/unwind)
   Compiling compiler_builtins v0.1.72
   Compiling libc v0.2.122
error[E0433]: failed to resolve: could not find `prelude` in `core`

error[E0432]: unresolved import `core::ops`
 --> /home/r/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/compiler_builtins-0.1.72/src/float/mod.rs:1:5
  |
1 | use core::ops;
  |     ^^^^^^^^^ no `ops` in the root

error[E0432]: unresolved import `core::ops`
 --> /home/r/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/compiler_builtins-0.1.72/src/int/mod.rs:1:5
  |
1 | use core::ops;
  |     ^^^^^^^^^ no `ops` in the root

[...]

error[E0412]: cannot find type `c_void` in the crate root
  --> /home/r/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/libc-0.2.122/src/unix/mod.rs:49:28
   |
49 | pub type locale_t = *mut ::c_void;
   |                            ^^^^^^ not found in the crate root

error[E0412]: cannot find type `c_void` in the crate root
   --> /home/r/.cargo/registry/src/github.tiyicn.workers.dev-1ecc6299db9ec823/libc-0.2.122/src/unix/mod.rs:151:30
    |
151 |         pub iov_base: *mut ::c_void,
    |                              ^^^^^^ not found in the crate root

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions