1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-09-13 10:37:58 +00:00
Commit graph

58 commits

Author SHA1 Message Date
Sylvestre Ledru
eff2cd997e
Create an uufuzz crate for common functions and use it (#7954)
* uufuzz: create a crate with the common functions

* uufuzz: move the fuzz-common functions

* uufuzz: polish the crate

* adjust the fuzzer to use uufuzz
2025-05-21 09:26:59 +02:00
Ben Wiederhake
0011b6e3f7 run cargo fmt on missed files
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 --
2025-05-19 11:17:46 +02:00
Jeremy Smart
044b33d8cb
Merge pull request #7760 from Qelxiros/7670-tail-hex-formatting
tail hex parsing, remove fundu dependency
2025-04-23 18:34:00 +02:00
Sylvestre Ledru
2103911d1a
Merge pull request #7717 from drinkcat/fuzz-minor-fixes
Fuzzing: minor fixes
2025-04-09 21:13:35 -04:00
Nicolas Boichat
2caeaf511e 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...
2025-04-09 20:58:30 +02:00
Nicolas Boichat
75072b5a98 fuzz: Run cargo fmt 2025-04-09 08:55:32 +02:00
Daniel Hofstetter
a77e218a79
Merge pull request #7690 from nyurik/manual-inline
chore: manual inline formatting - tests
2025-04-08 15:27:14 +02:00
Yuri Astrakhan
3dc771924c chore: cleanup trailing commas before parens
Deleted commas in cases like `foo,)` -- mostly in macros
2025-04-08 00:33:58 -04:00
Yuri Astrakhan
982805d3cd chore: manual inline formatting
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).
2025-04-08 00:23:21 -04:00
Nicolas Boichat
6243dd5494 uucore: Move parser to a feature
This will eventually be needed as we'll want parse_time to
call into num_parser, which was previously contained in format
feature.
2025-04-04 15:25:06 +02:00
Sylvestre Ledru
b4ac10769d add some missing unsafe 2025-03-24 21:33:16 +01:00
Daniel Hofstetter
41f1c6b2da fuzz: use new "<"/">" operators in fuzz_test 2025-02-21 14:58:54 +01:00
Dorian Peron
6afa515859 fuzz(cksum): fix fuzzer to use GNU's binary instead of the systems', remove false positives, improve logging 2025-02-12 19:46:18 +01:00
Dorian Peron
5d952afa3d fuzz: improve readability of fuzzer output, add colors 2025-02-09 00:33:21 +01:00
Daniel Hofstetter
9aec9dc454 fuzz: adapt to API changes of rand 2025-01-30 14:41:36 +01:00
Sylvestre Ledru
04f130ac08 fuzzing: add a new fuzzer for cksum 2024-11-16 20:18:12 +01:00
Sylvestre Ledru
6f43aa3739 fuzzing: add a function to generate a file with random content 2024-11-16 20:18:12 +01:00
Andrew Liebenow
bac29943cb fuzz: run GNU Core Utilities with LC_ALL=C 2024-10-18 09:33:02 -05:00
Sylvestre Ledru
10def29b96
seq: fuzz PreciseNumber::from_str (#6183)
* fuzz the seq parse number functions

* run fuzz_parse_number into the CI
2024-04-15 08:07:06 +02:00
Sylvestre Ledru
076710d288
Merge pull request #6167 from sylvestre/fuzz_env
add env & tr fuzzers + small improvs
2024-04-02 09:10:33 +02:00
Sylvestre Ledru
7919b4e3cd fuzz: start fuzzing env & tr 2024-04-01 23:19:02 +02:00
Ben Wiederhake
58aab48ab2 fuzz: also generate the empty string sometimes
Inspired by #6167, #6175, and the observation that 'echo hello "" world | hd' outputs extra spaces.
2024-04-01 21:02:08 +02:00
Sylvestre Ledru
08f324bf40 Silent some clippy warnings 2024-04-01 01:06:17 +02:00
Sylvestre Ledru
39b6059910 rustfmt the expr fuzzer 2024-04-01 01:06:17 +02:00
Daniel Hofstetter
89bad851e6 fuzzing: set LC_ALL=C when running GNU printf 2024-02-17 16:07:03 +01:00
Daniel Hofstetter
12f0972df4 fuzzing: use LC_ALL instead of LC_COLLATE 2024-01-27 15:04:12 +01:00
Sylvestre Ledru
8493800d4f
fuzzing: print the diff in case of issue (#5866)
* 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>
2024-01-22 08:06:13 +01:00
Sylvestre Ledru
19e1f26e3d fuzz: with pipe, also capture stderr 2024-01-13 14:08:48 +01:00
Samuel Tardieu
4343ba6695 fuzz: fix file descriptor leak 2024-01-05 11:04:16 +01:00
Samuel Tardieu
c23dbd3166 fuzz: reset the exit code global variable after every test 2024-01-04 19:07:24 +01:00
Sylvestre Ledru
d07a2f0d86
Add new fuzzers: cut, sort, split and wc (#5760)
* 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>
2024-01-04 13:40:47 +01:00
Sylvestre Ledru
cdd3492532 fuzz: use thread to bypass the limitation of output
Closes: #5724

many thanks to @samueltardieu
2024-01-01 13:26:56 +01:00
Sylvestre Ledru
546201bd00
fuzz: add the capability to pipe info into fuzz (#5668)
* fuzz: add the capability to pipe info into fuzz

* address the comments

* show the piped message if any
2023-12-21 16:18:00 +01:00
Sylvestre Ledru
ce2a5d5b9a
expr fuzz: add missing ops. found thanks to oss fuzz coverage (#5557)
* expr fuzz: add missing ops. found thanks to oss fuzz coverage
https://storage.googleapis.com/oss-fuzz-coverage/rust-coreutils/reports/20231118/linux/src/rust-coreutils/src/uu/expr/src/syntax_tree.rs.html

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-12-20 15:15:20 +01:00
Sylvestre Ledru
b2e26f2aec fuzz: Simplify the compare_result function 2023-12-17 17:57:21 +01:00
Sylvestre Ledru
2fcfec6490 fuzz seq 2023-12-05 22:10:15 +01:00
Sylvestre Ledru
9ef43191ff
Document that \0NNN and \xHH need more work 2023-12-04 21:20:47 +01:00
Sylvestre Ledru
4d5c034eb1 Run the echo fuzzer in the CI 2023-11-30 09:14:58 +01:00
Sylvestre Ledru
66e0835e72 fuzz the echo command 2023-11-29 09:55:55 +01:00
Sylvestre Ledru
a0ac3dd229
fuzz printf (#5556)
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-11-21 12:38:12 +01:00
Sylvestre Ledru
fddf301a52 fuzz: Move a duplicate function into fuzz_common 2023-11-12 10:25:55 +01:00
Sylvestre Ledru
2746c199cf use a command result structure 2023-11-10 16:01:38 +01:00
Sylvestre Ledru
104e707b07 fuzzing: provide a better error management 2023-11-09 17:40:27 +01:00
Sylvestre Ledru
8ab20c4673 fuzz: adjust the fuzzers with the new arg 2023-11-09 10:54:41 +01:00
Sylvestre Ledru
064ad7200c fuzzing function should also return stderr 2023-11-09 10:54:41 +01:00
Sylvestre Ledru
5fed5443e4 fuzz: flush after calling uumain - was failing with printf 2023-11-09 10:54:41 +01:00
Sylvestre Ledru
2e0e88c3ac fuzz: verify the various steps when opening/closing fd 2023-11-09 10:54:41 +01:00
Zhuoxun Yang
6a468e928d fuzz: use parse_size_u64 2023-10-29 18:54:40 +08:00
Daniel Hofstetter
12765a445e fuzz: set LC_COLLATE=C for expr 2023-10-18 10:20:28 +02:00
Sylvestre Ledru
a576054d42 fuzz: fix clippy warnings 2023-09-28 21:52:26 +02:00