Git Product home page Git Product logo

Comments (2)

racko avatar racko commented on May 6, 2024 2

How about the following?

void ConvertWOFF2ToTTF(const std::vector<std::uint8_t>& bytes) {
    const uint8_t* const data{bytes.data()};
    const int size{static_cast<int>(bytes.size())};
    // ...
}
FUZZ_TEST(AlbertoFuzzTest, ConvertWOFF2ToTTF);

from fuzztest.

thealberto avatar thealberto commented on May 6, 2024

@racko

Thanks it worked!

INFO: Found 1 target...
Target //:alberto up-to-date:
  bazel-bin/alberto
INFO: Elapsed time: 3.321s, Critical Path: 3.27s
INFO: 3 processes: 1 internal, 2 linux-sandbox.
INFO: Build completed successfully, 3 total actions
INFO: Running command line: external/bazel_tools/tools/test/test-setup.sh ./alberto '--fuzz=AlbertoFuzzTest.ConvertWOFF2ToTTF'
exec ${PAGER:-/usr/bin/less} "$0" || exit 1
Executing tests from //:alberto
-----------------------------------------------------------------------------
[.] Sanitizer coverage enabled. Counter map size: 30385, Cmp map size: 262144
Note: Google Test filter = AlbertoFuzzTest.ConvertWOFF2ToTTF
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from AlbertoFuzzTest
[ RUN      ] AlbertoFuzzTest.ConvertWOFF2ToTTF
FUZZTEST_PRNG_SEED=tnaxpgtwGcTdechb4cT-MAbJTMn3j09oJQQ1jE_rR5Y
[*] Corpus size:     1 | Edges covered:    152 | Fuzzing time:        342.062us | Total runs:  1.00e+00 | Runs/secs:  2923 | Max stack usage:     2880
[*] Corpus size:     2 | Edges covered:    152 | Fuzzing time:        745.952us | Total runs:  3.00e+00 | Runs/secs:  4021 | Max stack usage:     2880
[*] Corpus size:     3 | Edges covered:    154 | Fuzzing time:        1.85638ms | Total runs:  3.50e+01 | Runs/secs: 18853 | Max stack usage:     2880
[*] Corpus size:     4 | Edges covered:    154 | Fuzzing time:       4.787332ms | Total runs:  3.90e+01 | Runs/secs:  8146 | Max stack usage:     2880
[*] Corpus size:     5 | Edges covered:    154 | Fuzzing time:        6.88421ms | Total runs:  4.20e+01 | Runs/secs:  6100 | Max stack usage:     2880

Is it worth to add an example in the docs?

from fuzztest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.