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

attempt to fix tests on mac (does not work) #28

Closed
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
2 participants
@seanpont
Contributor

seanpont commented Jan 12, 2018

This change was intended to ensure that archs_enable() was only ever called once, the assumption being that multiple concurrent calls to archs_enable() might be causing the tests to fail on osx. Unfortunately, it did not work. Tests continue to be flaky.

➜  capstone-rs git:(master) ✗ cargo test
   Compiling capstone v0.2.0 (file:///Users/tron/Code/rust/capstone-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 2.56 secs
     Running target/debug/deps/capstone-283a9278dd691db2

running 24 tests
test constants::test::test_cs_mode_size ... ok
test capstone::test::test_set_extra_mode ... ok
test test::test_arch_xcore ... ok
test test::test_arm64_none ... ok
test test::test_arch_systemz ... ok
test test::test_arch_ppc ... ok
test test::test_capstone_is_diet ... ok
test test::test_arch_sparc ... ok
test test::test_arch_mips ... ok
test test::test_capstone_supports_arch ... ok
test test::test_capstone_version ... ok
test test::test_arch_arm64 ... ok
test test::test_invalid_mode ... ok
test test::test_invalid_syntax ... ok
test test::test_extra_mode ... ok
test test::test_arm_simple ... ok
test test::test_x86_names ... ok
test test::test_arch_arm ... ok
test test::test_detail_false_fail ... ok
test test::test_x86_simple ... ok
test test::test_detail_true ... ok
test test::test_arch_x86 ... ok
test test::test_instruction_group_ids ... FAILED
test test::test_syntax ... ok

failures:

---- test::test_instruction_group_ids stdout ----
	thread 'test::test_instruction_group_ids' panicked at 'index 207 out of range for slice of length 8', src/libcore/slice/mod.rs:748:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    test::test_instruction_group_ids

test result: FAILED. 23 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--lib'
➜  capstone-rs git:(master) ✗ cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/capstone-283a9278dd691db2

running 24 tests
test constants::test::test_cs_mode_size ... ok
test capstone::test::test_set_extra_mode ... ok
test test::test_arch_systemz ... ok
test test::test_arch_xcore ... ok
test test::test_arch_ppc ... ok
test test::test_arch_mips ... ok
test test::test_arm64_none ... ok
test test::test_arch_sparc ... ok
test test::test_arm_simple ... ok
test test::test_capstone_is_diet ... ok
test test::test_arch_arm64 ... ok
test test::test_capstone_supports_arch ... ok
test test::test_capstone_version ... ok
test test::test_detail_false_fail ... ok
test test::test_detail_true ... ok
test test::test_extra_mode ... ok
test test::test_arch_x86 ... ok
test test::test_invalid_mode ... ok
test test::test_invalid_syntax ... ok
test test::test_arch_arm ... ok
test test::test_x86_names ... ok
test test::test_x86_simple ... ok
test test::test_instruction_group_ids ... ok
test test::test_syntax ... ok

test result: ok. 24 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

   Doc-tests capstone

running 4 tests
test src/lib.rs - prelude (line 65) ... ok
test src/capstone.rs - capstone::Capstone::new (line 99) ... ok
test src/capstone.rs - capstone::Capstone::new_raw (line 110) ... ok
test src/lib.rs -  (line 9) ... ok

test result: ok. 4 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

➜  capstone-rs git:(master) ✗ cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target/debug/deps/capstone-283a9278dd691db2

running 24 tests
test constants::test::test_cs_mode_size ... ok
test capstone::test::test_set_extra_mode ... ok
test test::test_arch_ppc ... ok
test test::test_arch_mips ... ok
test test::test_arch_sparc ... ok
test test::test_arch_arm64 ... ok
test test::test_arch_systemz ... ok
test test::test_arm64_none ... ok
test test::test_arm_simple ... ok
test test::test_arch_xcore ... ok
test test::test_capstone_is_diet ... ok
test test::test_capstone_supports_arch ... ok
test test::test_capstone_version ... ok
test test::test_detail_false_fail ... ok
test test::test_extra_mode ... ok
test test::test_detail_true ... ok
test test::test_invalid_mode ... ok
test test::test_arch_x86 ... ok
test test::test_invalid_syntax ... ok
test test::test_arch_arm ... ok
test test::test_x86_names ... ok
test test::test_x86_simple ... ok
test test::test_instruction_group_ids ... FAILED
test test::test_syntax ... ok

failures:

---- test::test_instruction_group_ids stdout ----
	thread 'test::test_instruction_group_ids' panicked at 'Expected groups {2} does NOT match computed insn groups {111, 110} with ', src/lib.rs:287:8
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    test::test_instruction_group_ids

test result: FAILED. 23 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out

error: test failed, to rerun pass '--lib'
@tmfink

This comment has been minimized.

Show comment
Hide comment
@tmfink

tmfink May 13, 2018

Member

Attempts to address Issue #26 .
Cherry-picked in PR #35.

Member

tmfink commented May 13, 2018

Attempts to address Issue #26 .
Cherry-picked in PR #35.

@tmfink tmfink closed this May 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment