[tor-bugs] #27229 [Core Tor/Tor]: Create fuzzing harness to compare C/Rust Functionality

Tor Bug Tracker & Wiki blackhole at torproject.org
Tue Aug 21 02:10:52 UTC 2018


#27229: Create fuzzing harness to compare C/Rust Functionality
------------------------------+-----------------------------------
     Reporter:  chelseakomlo  |      Owner:  (none)
         Type:  defect        |     Status:  new
     Priority:  Medium        |  Milestone:  Tor: unspecified
    Component:  Core Tor/Tor  |    Version:
     Severity:  Normal        |   Keywords:  rust, protover, fuzz,
Actual Points:                |  Parent ID:  #24265
       Points:                |   Reviewer:
      Sponsor:                |
------------------------------+-----------------------------------
 In porting over functionality to Rust, it can be useful to compare
 functionality between C/Rust. While ideally unit tests should catch most
 behavior, having a fuzzer to catch edge cases can be handy.

 We should write a test harness that fuzzes C/Rust similar functions and
 compares their output. Ideally, a test would look something like this:

 1. Setup C test case
 2. Set up Rust test case
 3. Provide both functions with the same generated arbitrary input
 4. Compare results

 It is worth noting that in most cases we will want to improve behavior
 when porting to Rust, but this tool can be useful for small cases where we
 want bitwise identical functions.

 Alex Crichton recommended looking at https://github.com/alexcrichton/ctest
 as one option- it is worth looking at what a simple test harness should be
 and how to have code be reusable between tests.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/27229>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list