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

Make check doesn't prevent people from breaking make check-stage0-std #8470

Closed
bblum opened this issue Aug 12, 2013 · 2 comments
Closed

Make check doesn't prevent people from breaking make check-stage0-std #8470

bblum opened this issue Aug 12, 2013 · 2 comments
Labels
A-linkage Area: linking into static, shared libraries and binaries A-testsuite Area: The testsuite used to check the correctness of rustc

Comments

@bblum
Copy link
Contributor

bblum commented Aug 12, 2013

When developing inside of libstd, it's a lot more convenient to be able to make check-stage0-std instead of make check-stage2-std. But every now and again, we lose the ability to do that to some obscure linker error which can languish for a long time because the test suite doesn't make sure that it works.

Currently it is broken due to this:

error: duplicate entry for `str_eq`
error: aborting due to previous error
@brson
Copy link
Contributor

brson commented Aug 12, 2013

The current breakage is because of this declaration:

/// Bytewise slice equality                                                                                                                                                      
#[cfg(test, stage0)]
#[lang="str_eq"]
#[inline]
pub fn eq_slice(a: &str, b: &str) -> bool {
    do a.as_imm_buf |ap, alen| {
        do b.as_imm_buf |bp, blen| {
            if (alen != blen) { false }
            else {
                unsafe {
                    libc::memcmp(ap as *libc::c_void,
                                 bp as *libc::c_void,
                                 (alen - 1) as libc::size_t) == 0
                }
            }
        }
    }
}

It shouldn't be declared as a lang item - it is explicitly creating a duplicate lang item for stage0 stdtest

@alexcrichton
Copy link
Member

I don't think that this is really an issue that's completely actionable. The best takeaway from this is "make snapshots more often". There are very real reasons I think why make check-stage0-std should break sometimes (while stage0 changes are being made).

Hopefully the windows in which make check-stage0-std is broken are fairly small, but I think that there's not much to do on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-linkage Area: linking into static, shared libraries and binaries A-testsuite Area: The testsuite used to check the correctness of rustc
Projects
None yet
Development

No branches or pull requests

3 participants