Skip to content

Conversation

@drinkcat
Copy link
Collaborator

@drinkcat drinkcat commented Apr 9, 2025

Not quite sure what's the proper way to run cargo clippy in fuzz, as it fails if I do cd fuzz && cargo clippy.

Let's fix what we can for now, we can think about how to add fmt/clippy tests to CI later (#7718).


workflows/fuzzing.yml: Add timeout equal to total run time

Just in case some of the values cause an infinite loop (or at
least take a very long time, see #7708), timeout, with the same
duration as the maximum total fuzzing time.

That'll allow us to see what input causes the infinite loop.

fuzz: Run cargo clippy

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...

fuzz: Run cargo fmt

drinkcat added 3 commits April 9, 2025 08:55
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...
Just in case some of the values cause an infinite loop (or at
least take a _very_ long time, see uutils#7708), timeout, with the same
duration as the maximum total fuzzing time.

That'll allow us to _see_ what input causes the infinite loop.
@github-actions
Copy link

github-actions bot commented Apr 9, 2025

GNU testsuite comparison:

Skipping an intermittent issue tests/timeout/timeout (passes in this run but fails in the 'main' branch)

@sylvestre sylvestre merged commit 2103911 into uutils:main Apr 10, 2025
69 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants