* uufuzz: create a crate with the common functions
* uufuzz: move the fuzz-common functions
* uufuzz: polish the crate
* adjust the fuzzer to use uufuzz
It seems these files were missed by CI. Command to run cargo fmt on
absolutely *everything* (and possibly too much)
find tests -name "*.rs" -print0 | xargs -0 cargo fmt --
Unfortunately, cargo clippy fails when testing fuzz_seq_parse_number:
```
error[E0603]: module `number` is private
--> fuzz_targets/fuzz_seq_parse_number.rs:9:13
|
9 | use uu_seq::number::PreciseNumber;
| ^^^^^^ private module
|
note: the module `number` is defined here
--> /home/drinkcat/dev/coreutils/coreutils/src/uu/seq/src/seq.rs:24:1
|
24 | mod number;
| ^^^^^^^^^^
```
But we can still fix the rest...
Minor manual cleanup - inlined many format args. This makes the code a bit more readable, and helps spot a few inefficiencies and possible bugs. Note that `&foo` in a `format!` parameter results in a 6% extra performance cost, and does not get inlined by the compiler (yet).
* fuzzing: print the diff in case of issue
* Simplify the code
* fuzz: remove unused import similar::ChangeTag
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* fuzz: use thread to bypass the limitation of output
Closes: #5724
many thanks to @samueltardieu
* fuzz: enable seq as the stalled issue is fixed
* fuzz: add 4 more fuzzers
* fuzz: enable the 4 new fuzzers in the CI
* remove old import
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* remove comment
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* remove comment
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* add more flags
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* add space
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* add a comment about sort local
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* wrong copy/paste
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* fuzz: import "std::env"
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>