AFLplusplus / AFLplusplus/LibAFL

Improvements to testing framework

オープン
#1,799 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
enhancement
主要言語
Rust
スター
2.6k
フォーク
481
平均マージ
2日 30分
マージ済み PR(30日)
16

説明

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.

1. Currently all the ASAN tests run as one 'cargo test' testcase. This has the following cons:
- If a single test fails, the remainder of the tests do not run
- There is no nice 'cargo test' UI showing pass/fails for each test.
- It's impossible to run a single test from the list
2. Currently to write a test, one needs to add a function to `test_harness.cc`, and then add the test name and expectation to the list in `lib.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 the `lib.rs` and have machinery to produce a shared-object/dll/dylib for the test automatically.
3. Currently we only support simple expectations. Specifically: was there an ASAN error, and what type was it. For true unit testing, we would want to be able to specify complex expectations, includng things like checking that the backtrace is correct, the registers captured are correct etc.
4. Currently all test-cases are in a shared-object/dll. This is not strictly necessary. It might be signifcantly easier to use a static library and link the test-cases into the library.
5. Currently we use the `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 a `fuzz_until_solution` method.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。