Open s1341 opened 5 months ago
Regarding 4, it may indeed be necessary to use a distinct shared-object for frida testing.
I would say using cargo make test
(or similar) is the correct solution for most of the issues described here. We can keep rust unittests simple and specify more complex integration tests in makefile.toml, why not?
Having the tests tightly coupled to the code they are testing seems like a better stratergy to actually encourage tests being written... The simpler it is to write them, the better.
I agree, however I'm not convinced blowing up cargo test
to something super complex will make it simpler to write tests in the end
Recently @mkravchik merged a PR aimed at adding e2e-testing capabilities to the library in order to allow for easy testing of e.g. frida ASAN.
After using his solution a bit, and making a few improvements (see changes in PR #1607), here are some ideas to improve upon it even more.
test_harness.cc
, and then add the test name and expectation to the list inlib.rs
. This is a bit clunky. Ideally we'd be able to both specify the C/C++ function to be tested and the expectations, easily from within thelib.rs
and have machinery to produce a shared-object/dll/dylib for the test automatically.fuzz_one
method to execute our test case. While this is sufficient for the ASAN tests, it will not be enough for e.g. cmplog testing. We should introduce afuzz_until_solution
method.