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

Some automated bindgen tests fail #18

Closed
tmfink opened this issue Jan 16, 2018 · 1 comment
Closed

Some automated bindgen tests fail #18

tmfink opened this issue Jan 16, 2018 · 1 comment
Labels

Comments

@tmfink
Copy link
Member

tmfink commented Jan 16, 2018

This happens because of rust-lang/rust-bindgen#1213

Possible solutions:

  • Disable tests
  • Conditionally disable tests on archs that fail them
  • Refactor tests into a separate file

Example on stable-i686-pc-windows-msvc:

$ cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running target\debug\deps\capstone_sys-4b9bbef9612e834d.exe

running 53 tests
test bindgen_test_layout___va_list_tag ... FAILED
test bindgen_test_layout_arm64_op_mem ... ok
test bindgen_test_layout_arm_op_mem ... ok
test bindgen_test_layout_cs_arm ... ok
test bindgen_test_layout_cs_arm64 ... ok
test bindgen_test_layout_cs_arm64_op ... ok
test bindgen_test_layout_cs_arm64_op__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_arm64_op__bindgen_ty_2 ... ok
test bindgen_test_layout_cs_arm_op ... ok
test bindgen_test_layout_cs_arm_op__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_arm_op__bindgen_ty_2 ... ok
test bindgen_test_layout_cs_detail ... ok
test bindgen_test_layout_cs_detail__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_insn ... FAILED
test bindgen_test_layout_cs_mips ... ok
test bindgen_test_layout_cs_mips_op ... ok
test bindgen_test_layout_cs_mips_op__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_opt_mem ... FAILED
test bindgen_test_layout_cs_opt_skipdata ... FAILED
test bindgen_test_layout_cs_ppc ... ok
test bindgen_test_layout_cs_ppc_op ... ok
test bindgen_test_layout_cs_ppc_op__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_sparc ... ok
test bindgen_test_layout_cs_sparc_op ... ok
test bindgen_test_layout_cs_sparc_op__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_sysz ... ok
test bindgen_test_layout_cs_sysz_op ... ok
test bindgen_test_layout_cs_sysz_op__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_x86 ... ok
test bindgen_test_layout_cs_x86_op ... ok
test bindgen_test_layout_cs_x86_op__bindgen_ty_1 ... ok
test bindgen_test_layout_cs_xcore ... ok
test bindgen_test_layout_cs_xcore_op ... ok
test bindgen_test_layout_cs_xcore_op__bindgen_ty_1 ... ok
test bindgen_test_layout_mips_op_mem ... ok
test bindgen_test_layout_ppc_op_crx ... ok
test bindgen_test_layout_ppc_op_mem ... ok
test bindgen_test_layout_sparc_op_mem ... ok
test bindgen_test_layout_sysz_op_mem ... ok
test bindgen_test_layout_x86_op_mem ... ok
test bindgen_test_layout_xcore_op_mem ... ok
test test::test_arch_arm ... ok
test test::test_arch_arm64 ... ok
test test::test_arch_mips ... ok
test test::test_arch_ppc ... ok
test test::test_arch_sparc ... ok
test test::test_arch_sysz ... ok
test test::test_arch_x86 ... ok
test test::test_arch_xcore ... ok
test test::test_cs_support ... ok
test test::test_cs_version ... ok
test test::test_non_arch_types ... ok
test test::test_x86_disassembly ... ok

failures:

---- bindgen_test_layout___va_list_tag stdout ----
	thread 'bindgen_test_layout___va_list_tag' panicked at 'assertion failed: `(left == right)`
  left: `16`,
 right: `24`: Size of: __va_list_tag', target\debug\build\capstone-sys-346b4f8e4123ac85\out/capstone.rs:9016:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- bindgen_test_layout_cs_insn stdout ----
	thread 'bindgen_test_layout_cs_insn' panicked at 'assertion failed: `(left == right)`
  left: `232`,
 right: `240`: Size of: cs_insn', target\debug\build\capstone-sys-346b4f8e4123ac85\out/capstone.rs:8602:4

---- bindgen_test_layout_cs_opt_mem stdout ----
	thread 'bindgen_test_layout_cs_opt_mem' panicked at 'assertion failed: `(left == right)`
  left: `20`,
 right: `40`: Size of: cs_opt_mem', target\debug\build\capstone-sys-346b4f8e4123ac85\out/capstone.rs:100:4

---- bindgen_test_layout_cs_opt_skipdata stdout ----
	thread 'bindgen_test_layout_cs_opt_skipdata' panicked at 'assertion failed: `(left == right)`
  left: `12`,
 right: `24`: Size of: cs_opt_skipdata', target\debug\build\capstone-sys-346b4f8e4123ac85\out/capstone.rs:189:4


failures:
    bindgen_test_layout___va_list_tag
    bindgen_test_layout_cs_insn
    bindgen_test_layout_cs_opt_mem
    bindgen_test_layout_cs_opt_skipdata

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

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

This was reported by @mthiesen in #17

@tmfink
Copy link
Member Author

tmfink commented Jul 8, 2018

Fixed with #25

@tmfink tmfink closed this as completed Jul 8, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant