rbspy
rbspy copied to clipboard
test failures on 32 bit architectures
While trying to package rbspy for Fedora I noticed a number of test failures around bindgen on 32 bit architectures:
- armv7hl: https://koji.fedoraproject.org/koji/taskinfo?taskID=78334998
- i686: https://koji.fedoraproject.org/koji/taskinfo?taskID=78334999
You can see the full log by opening build.log on those pages.
Hey, thanks for doing this packaging work. I'm planning to retire 32-bit support soon (probably for the 0.9 release) because it hasn't been tested for some time, and very few people seem to be using it. Your best option is probably to package for 64-bit architectures and ignore the others.
It was mentioned in https://github.com/rbspy/proc-maps/issues/17 that py-spy works on 32-bit devices, so rbspy might be able to support them too. I'll look into the test failures - should have time during the next week.
I just tried running the main rbspy tests on a 32bit armv7 machine (raspberry pi) and the tests all passed for me:
pi@raspberrypi:~/code/rbspy $ cargo test
ca Finished test [unoptimized + debuginfo] target(s) in 0.28s
Running target/debug/deps/rbspy-2e28db8da40b5e92
running 15 tests
test core::initialize::tests::test_initialize_with_disallowed_process ... ok
test core::initialize::tests::test_initialize_with_nonexistent_process ... ok
test core::initialize::tests::test_current_thread_address ... ok
test core::initialize::tests::test_get_trace ... ok
test sampler::tests::test_sample_single_process ... ok
test ui::callgrind::tests::stats_aggregate ... ok
test ui::callgrind::tests::stats_write ... ok
test ui::flamegraph::tests::test_collapsed ... ok
test ui::flamegraph::tests::test_flamegraph_from_collapsed ... ok
test ui::flamegraph::tests::test_stats ... ok
test ui::summary::tests::stats_by_function ... ok
test ui::summary::tests::stats_by_line_number ... ok
test sampler::tests::test_sample_single_process_with_time_limit ... ok
test core::initialize::tests::test_get_exec_trace ... ok
test sampler::tests::test_sample_subprocesses ... ok
test result: ok. 15 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/rbspy-36b86a04ccaf9ad4
running 3 tests
test tests::test_output_filename ... ok
test tests::test_report_arg_parsing ... ok
test tests::test_arg_parsing ... ok
test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Doc-tests rbspy
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
I think the build errors reported might just be unittest failures in the rbspy/ruby-structs
sub crate , rather than an issue that prevents rbspy from working on 32bit linux platforms.
Sorry, I should have clarified in the original issue -- you are correct that those failures are specific to rbspy-ruby-structs, I haven't gotten around trying the main crate yet (as I need to sort out the dependencies first).
Got it. Yeah, there may be issues with bindgen's alignment tests on 32-bit. If we can isolate the problematic types, excluding them (if they're not directly used in rbspy) or making them opaque might fix the test failures.
Would Fedora's packaging rules allow you to exclude the bindgen (ruby-structs) tests since they're not testing rbspy itself?
Yes, we can gate tests out as needed in Fedora (though ideally they'd be fixed upstream eventually). I'll reference this issue for the time being. Thanks!
We stopped generating bindgen layout tests a while ago (here), so this should be fixed. If not, feel free to reopen.